Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 172 → Rev 173

/SPARTAN/trunk/arch/ia32/include/asm.h
34,6 → 34,7
#include <mm/page.h>
#include <synch/spinlock.h>
#include <arch/boot/memmap.h>
#include <config.h>
 
extern __u32 interrupt_handler_size;
 
156,4 → 157,18
return v;
}
 
/** Return base address of current stack
*
* Return the base address of the current stack.
* The stack is assumed to be STACK_SIZE bytes long.
*/
static inline __address get_stack_base(void)
{
__address v;
__asm__ volatile ("andl %%esp, %0\n" : "=r" (v) : "0" (~(STACK_SIZE-1)));
return v;
}
 
#endif