L4Re - L4 Runtime Environment
stack_impl.h
Go to the documentation of this file.
1 
5 /*
6  * (c) 2008-2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>
7  * economic rights: Technische Universit├Ąt Dresden (Germany)
8  * This file is part of TUD:OS and distributed under the terms of the
9  * GNU Lesser General Public License 2.1.
10  * Please see the COPYING-LGPL-2.1 file for details.
11  */
12 #ifndef __L4UTIL__INCLUDE__ARCH_X86__STACK_IMPL_H__
13 #define __L4UTIL__INCLUDE__ARCH_X86__STACK_IMPL_H__
14 
15 #ifndef _L4UTIL_STACK_H
16 #error Do not include stack_impl.h directly, use stack.h instead
17 #endif
18 
20 
22 {
23  l4_addr_t esp;
24 
25  asm("movl %%esp, %0\n\t" : "=r" (esp) : );
26  return esp;
27 }
28 
30 
31 #endif /* ! __L4UTIL__INCLUDE__ARCH_ARM__STACK_IMPL_H__ */
#define EXTERN_C_END
End section with C types and functions.
Definition: compiler.h:187
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