diff options
author | Earnie Boyd <earnie@users.sf.net> | 2001-08-10 11:52:35 +0000 |
---|---|---|
committer | Earnie Boyd <earnie@users.sf.net> | 2001-08-10 11:52:35 +0000 |
commit | 62868064735588e834d20902937012b20776d395 (patch) | |
tree | e58146ea77d5ed37a5b8b940c845a6bcae31c2d3 /winsup/w32api/lib/kernel32.c | |
parent | 5b9d54bf972e1b9af3833e29dbc89298fcbe5d7b (diff) | |
download | cygnal-62868064735588e834d20902937012b20776d395.tar.gz cygnal-62868064735588e834d20902937012b20776d395.tar.bz2 cygnal-62868064735588e834d20902937012b20776d395.zip |
* lib/kernels.c: New file.
Diffstat (limited to 'winsup/w32api/lib/kernel32.c')
-rw-r--r-- | winsup/w32api/lib/kernel32.c | 25 |
1 files changed, 25 insertions, 0 deletions
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; +} + |