summaryrefslogtreecommitdiffstats
path: root/winsup/w32api/include/winnt.h
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/w32api/include/winnt.h')
-rw-r--r--winsup/w32api/include/winnt.h23
1 files changed, 21 insertions, 2 deletions
diff --git a/winsup/w32api/include/winnt.h b/winsup/w32api/include/winnt.h
index 5960046c7..ed25f06a5 100644
--- a/winsup/w32api/include/winnt.h
+++ b/winsup/w32api/include/winnt.h
@@ -2499,8 +2499,27 @@ typedef struct _REPARSE_POINT_INFORMATION {
WORD ReparseDataLength;
WORD UnparsedNameLength;
} REPARSE_POINT_INFORMATION, *PREPARSE_POINT_INFORMATION;
-PVOID GetCurrentFiber(void);
-PVOID GetFiberData(void);
+__inline PVOID GetCurrentFiber(void)
+{
+ void* ret;
+ __asm__ volatile ("
+ movl %%fs:0x10,%0
+ movl (%0),%0
+ " : "=r" (ret) /* allow use of reg eax, ebx, ecx, edx, esi, edi */
+ :
+ );
+ return ret;
+}
+__inline PVOID GetFiberData(void)
+{
+ void* ret;
+ __asm__ volatile ("
+ movl %%fs:0x10,%0
+ " : "-r" (ret) /* allow use of reg eax,ebx,ecx,edx,esi,edi */
+ :
+ );
+ return ret;
+}
#endif
#ifdef __cplusplus
}