OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [cpukit/] [score/] [inline/] [rtems/] [score/] [stack.inl] - Blame information for rev 1774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1026 ivang
/*  stack.inl
2
 *
3
 *  This file contains the static inline implementation of the inlined
4
 *  routines from the Stack Handler.
5
 *
6
 *  COPYRIGHT (c) 1989-1999.
7
 *  On-Line Applications Research Corporation (OAR).
8
 *
9
 *  The license and distribution terms for this file may be
10
 *  found in the file LICENSE in this distribution or at
11
 *  http://www.OARcorp.com/rtems/license.html.
12
 *
13
 *  stack.inl,v 1.10 1999/11/17 17:50:37 joel Exp
14
 */
15
 
16
#ifndef __STACK_inl
17
#define __STACK_inl
18
 
19
/*PAGE
20
 *
21
 *  _Stack_Initialize
22
 *
23
 *  DESCRIPTION:
24
 *
25
 *  This routine initializes the_stack record to indicate that
26
 *  size bytes of memory starting at starting_address have been
27
 *  reserved for a stack.
28
 */
29
 
30
RTEMS_INLINE_ROUTINE void _Stack_Initialize (
31
  Stack_Control *the_stack,
32
  void          *starting_address,
33
  unsigned32     size
34
)
35
{
36
  the_stack->area = starting_address;
37
  the_stack->size = size;
38
}
39
 
40
/*PAGE
41
 *
42
 *  _Stack_Is_enough
43
 *
44
 *  DESCRIPTION:
45
 *
46
 *  This function returns TRUE if size bytes is enough memory for
47
 *  a valid stack area on this processor, and FALSE otherwise.
48
 */
49
 
50
RTEMS_INLINE_ROUTINE boolean _Stack_Is_enough (
51
  unsigned32 size
52
)
53
{
54
  return ( size >= STACK_MINIMUM_SIZE );
55
}
56
 
57
/*PAGE
58
 *
59
 *  _Stack_Adjust_size
60
 *
61
 *  DESCRIPTION:
62
 *
63
 *  This function increases the stack size to insure that the thread
64
 *  has the desired amount of stack space after the initial stack
65
 *  pointer is determined based on alignment restrictions.
66
 *
67
 *  NOTE:
68
 *
69
 *  The amount of adjustment for alignment is CPU dependent.
70
 */
71
 
72
RTEMS_INLINE_ROUTINE unsigned32 _Stack_Adjust_size (
73
  unsigned32 size
74
)
75
{
76
  return size + CPU_STACK_ALIGNMENT;
77
}
78
 
79
#endif
80
/* end of include file */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.