source: rtems/cpukit/score/inline/rtems/score/stack.inl @ baff4da

4.104.114.84.95
Last change on this file since baff4da was baff4da, checked in by Joel Sherrill <joel.sherrill@…>, on 11/01/04 at 13:22:41

2004-11-01 Joel Sherrill <joel@…>

  • score/cpu/no_cpu/rtems/score/cpu.h, score/include/rtems/debug.h, score/include/rtems/seterr.h, score/include/rtems/system.h, score/include/rtems/score/address.h, score/include/rtems/score/apiext.h, score/include/rtems/score/apimutex.h, score/include/rtems/score/bitfield.h, score/include/rtems/score/chain.h, score/include/rtems/score/context.h, score/include/rtems/score/copyrt.h, score/include/rtems/score/coremsg.h, score/include/rtems/score/coremutex.h, score/include/rtems/score/coresem.h, score/include/rtems/score/heap.h, score/include/rtems/score/interr.h, score/include/rtems/score/isr.h, score/include/rtems/score/mpci.h, score/include/rtems/score/mppkt.h, score/include/rtems/score/objectmp.h, score/include/rtems/score/priority.h, score/include/rtems/score/stack.h, score/include/rtems/score/states.h, score/include/rtems/score/sysstate.h, score/include/rtems/score/thread.h, score/include/rtems/score/threadmp.h, score/include/rtems/score/threadq.h, score/include/rtems/score/tod.h, score/include/rtems/score/tqdata.h, score/include/rtems/score/userext.h, score/include/rtems/score/watchdog.h, score/include/rtems/score/wkspace.h, score/inline/rtems/score/address.inl, score/inline/rtems/score/chain.inl, score/inline/rtems/score/coremsg.inl, score/inline/rtems/score/coremutex.inl, score/inline/rtems/score/coresem.inl, score/inline/rtems/score/heap.inl, score/inline/rtems/score/isr.inl, score/inline/rtems/score/mppkt.inl, score/inline/rtems/score/objectmp.inl, score/inline/rtems/score/priority.inl, score/inline/rtems/score/stack.inl, score/inline/rtems/score/states.inl, score/inline/rtems/score/sysstate.inl, score/inline/rtems/score/thread.inl, score/inline/rtems/score/threadmp.inl, score/inline/rtems/score/tod.inl, score/inline/rtems/score/tqdata.inl, score/inline/rtems/score/userext.inl, score/inline/rtems/score/watchdog.inl, score/inline/rtems/score/wkspace.inl: Add Doxygen comments -- working modifications which are not complete and may have broken code. Committing so work and testing can proceed.
  • score/Doxyfile, score/mainpage.h: New files.
  • Property mode set to 100644
File size: 1.5 KB
Line 
1/**
2 *  @file stack.inl
3 *
4 *  This file contains the static inline implementation of the inlined
5 *  routines from the Stack Handler.
6 */
7
8/*
9 *  COPYRIGHT (c) 1989-2004.
10 *  On-Line Applications Research Corporation (OAR).
11 *
12 *  The license and distribution terms for this file may be
13 *  found in the file LICENSE in this distribution or at
14 *  http://www.rtems.com/license/LICENSE.
15 *
16 *  $Id$
17 */
18
19#ifndef __STACK_inl
20#define __STACK_inl
21
22/**
23 *  @addtogroup ScoreStack
24 *  @{
25 */
26
27/**
28 *  This routine initializes the_stack record to indicate that
29 *  size bytes of memory starting at starting_address have been
30 *  reserved for a stack.
31 */
32
33RTEMS_INLINE_ROUTINE void _Stack_Initialize (
34  Stack_Control *the_stack,
35  void          *starting_address,
36  uint32_t       size
37)
38{
39  the_stack->area = starting_address;
40  the_stack->size = size;
41}
42
43/**
44 *  This function returns TRUE if size bytes is enough memory for
45 *  a valid stack area on this processor, and FALSE otherwise.
46 */
47
48RTEMS_INLINE_ROUTINE boolean _Stack_Is_enough (
49  uint32_t   size
50)
51{
52  return ( size >= STACK_MINIMUM_SIZE );
53}
54
55/**
56 *  This function increases the stack size to insure that the thread
57 *  has the desired amount of stack space after the initial stack
58 *  pointer is determined based on alignment restrictions.
59 *
60 *  @note
61 *
62 *  The amount of adjustment for alignment is CPU dependent.
63 */
64
65RTEMS_INLINE_ROUTINE uint32_t   _Stack_Adjust_size (
66  uint32_t   size
67)
68{
69  return size + CPU_STACK_ALIGNMENT;
70}
71
72/**@}*/
73
74#endif
75/* end of include file */
Note: See TracBrowser for help on using the repository browser.