L4Re - L4 Runtime Environment
stack.h
Go to the documentation of this file.
1 
12 /*
13  * (c) 2003-2009 Author(s)
14  * economic rights: Technische Universit├Ąt Dresden (Germany)
15  * This file is part of TUD:OS and distributed under the terms of the
16  * GNU Lesser General Public License 2.1.
17  * Please see the COPYING-LGPL-2.1 file for details.
18  */
19 
20 #ifndef _L4UTIL_STACK_H
21 #define _L4UTIL_STACK_H
22 
23 #include <l4/sys/types.h>
24 #include <l4/sys/compiler.h>
25 
27 
28 L4_INLINE void l4util_stack_push_mword(l4_addr_t *stack, l4_mword_t val);
29 
30 /*****************************************************************************/
36 L4_INLINE l4_addr_t l4util_stack_get_sp(void);
37 
38 /*
39  * Implementations.
40  */
41 
42 #include <l4/util/stack_impl.h>
43 
44 L4_INLINE void
45 l4util_stack_push_mword(l4_addr_t *stack, l4_mword_t val)
46 {
47  l4_mword_t *esp = (l4_mword_t*)(*stack);
48  *--esp = val;
49  *stack = (l4_addr_t)esp;
50 }
51 
53 
54 #endif
signed long l4_mword_t
Signed machine word.
Definition: l4int.h:49
Common L4 ABI Data Types.
#define EXTERN_C_END
End section with C types and functions.
Definition: compiler.h:187
L4 compiler related defines.
l4_addr_t l4util_stack_get_sp(void)
Get current stack pointer.
Definition: stack_impl.h:23
#define EXTERN_C_BEGIN
Start section with C types and functions.
Definition: compiler.h:186
unsigned long l4_addr_t
Address type.
Definition: l4int.h:45