source: rtems/cpukit/score/inline/rtems/score/stack.inl @ 9b4422a2

4.115
Last change on this file since 9b4422a2 was 9b4422a2, checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/12 at 15:09:24

Remove All CVS Id Strings Possible Using a Script

Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines

next to each other after Id string line removed.

+ remove entire comment blocks which only exited to

contain CVS Ids

+ If the processing left a blank line at the top of

a file, it was removed.

  • Property mode set to 100644
File size: 2.1 KB
Line 
1/**
2 *  @file  rtems/score/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-2006.
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
17#ifndef _RTEMS_SCORE_STACK_H
18# error "Never use <rtems/score/stack.inl> directly; include <rtems/score/stack.h> instead."
19#endif
20
21#ifndef _RTEMS_SCORE_STACK_INL
22#define _RTEMS_SCORE_STACK_INL
23
24#include <rtems/score/basedefs.h> /* RTEMS_INLINE_ROUTINE */
25
26/**
27 *  @addtogroup ScoreStack
28 *  @{
29 */
30
31/**
32 *  This routine initializes the_stack record to indicate that
33 *  size bytes of memory starting at starting_address have been
34 *  reserved for a stack.
35 */
36RTEMS_INLINE_ROUTINE void _Stack_Initialize (
37  Stack_Control *the_stack,
38  void          *starting_address,
39  size_t         size
40)
41{
42  the_stack->area = starting_address;
43  the_stack->size = size;
44}
45
46/**
47 *  This function returns the minimum stack size configured
48 *  for this application.
49 *
50 *  @return This method returns the minimum stack size;
51 */
52RTEMS_INLINE_ROUTINE uint32_t _Stack_Minimum (void)
53{
54  return rtems_minimum_stack_size;
55}
56
57/**
58 *  This function returns true if size bytes is enough memory for
59 *  a valid stack area on this processor, and false otherwise.
60 *
61 *  @param[in] size is the stack size to check
62 *
63 *  @return This method returns true if the stack is large enough.
64 */
65RTEMS_INLINE_ROUTINE bool _Stack_Is_enough (
66  size_t size
67)
68{
69  return ( size >= _Stack_Minimum() );
70}
71
72/**
73 *  This function returns the appropriate stack size given the requested
74 *  size.  If the requested size is below the minimum, then the minimum
75 *  configured stack size is returned.
76 *
77 *  @param[in] size is the stack size to check
78 *
79 *  @return This method returns the appropriate stack size.
80 */
81RTEMS_INLINE_ROUTINE size_t _Stack_Ensure_minimum (
82  size_t size
83)
84{
85  if ( size >= _Stack_Minimum() )
86    return size;
87  return _Stack_Minimum();
88}
89
90/**@}*/
91
92#endif
93/* end of include file */
Note: See TracBrowser for help on using the repository browser.