From 62868064735588e834d20902937012b20776d395 Mon Sep 17 00:00:00 2001 From: Earnie Boyd Date: Fri, 10 Aug 2001 11:52:35 +0000 Subject: * lib/kernels.c: New file. --- winsup/w32api/lib/kernel32.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 winsup/w32api/lib/kernel32.c diff --git a/winsup/w32api/lib/kernel32.c b/winsup/w32api/lib/kernel32.c new file mode 100644 index 000000000..c7c4b1807 --- /dev/null +++ b/winsup/w32api/lib/kernel32.c @@ -0,0 +1,25 @@ +/* extern (library) versions of inline functions defined in winnt.h */ + +void* GetCurrentFiber(void) +{ + void* ret; + __asm__ volatile ( + "movl %%fs:0x10,%0" + : "=r" (ret) /* allow use of reg eax,ebx,ecx,edx,esi,edi */ + : + ); + return ret; +} + +void* GetFiberData(void) +{ + void* ret; + __asm__ volatile ( + "movl %%fs:0x10,%0\n" + "movl (%0),%0" + : "=r" (ret) /* allow use of reg eax,ebx,ecx,edx,esi,edi */ + : + ); + return ret; +} + -- cgit v1.2.3