Lines Matching full:stack
6 A :dfn:`stack` is a kernel object that implements a traditional
17 Any number of stacks can be defined (limited only by available RAM). Each stack
20 A stack has the following key properties:
30 A stack must be initialized before it can be used. This sets its queue to empty.
32 A data value can be **added** to a stack by a thread or an ISR.
38 and prevent attempts to add a data value to a stack that has already reached
39 its maximum quantity of queued values. Adding a data value to a stack that is
42 A data value may be **removed** from a stack by a thread.
43 If the stack's queue is empty a thread may choose to wait for it to be given.
44 Any number of threads may wait on an empty stack simultaneously.
49 The kernel does allow an ISR to remove an item from a stack, however
50 the ISR must not attempt to wait if the stack is empty.
55 Defining a Stack
58 A stack is defined using a variable of type :c:struct:`k_stack`.
64 The following code defines and initializes an empty stack capable of holding
76 Alternatively, a stack can be defined and initialized at compile time
80 that the macro defines both the stack and its array of data values.
86 Pushing to a Stack
89 A data item is added to a stack by calling :c:func:`k_stack_push`.
93 in a stack.
104 /* save address of each data structure in a stack */
109 Popping from a Stack
112 A data item is taken from a stack by calling :c:func:`k_stack_pop`.
117 its address back on the stack to allow the data structure to be reused.
129 Use a stack to store and retrieve integer data values in a "last in,