* lib/test.c (Win32_Winsock): Replace with __USE_W32_SOCKETS.

Add more includes of w32api headers.
	* include/winnt.h (GetCurrentFiber): Change __inline to __inline__.
	Swap asm code with that of GetFiberData.
	(GetFiberData): Ditto.
	* lib/kernels.c: New file, containing library versions of
	GetCurrentFiber and GetFiberData.
	* lib/makefile.in: Add kernel32.o as static object to libkernal32.a.
This commit is contained in:
Earnie Boyd
2001-08-10 11:51:03 +00:00
parent b5c27d80c0
commit 5b9d54bf97
4 changed files with 77 additions and 19 deletions

View File

@@ -2507,27 +2507,29 @@ typedef struct _REPARSE_POINT_INFORMATION {
WORD ReparseDataLength;
WORD UnparsedNameLength;
} REPARSE_POINT_INFORMATION, *PREPARSE_POINT_INFORMATION;
extern __inline PVOID GetCurrentFiber(void)
extern __inline__ PVOID GetCurrentFiber(void)
{
void* ret;
__asm__ volatile ("\n\
movl %%fs:0x10,%0\n\
movl (%0),%0\n\
" : "=r" (ret) /* allow use of reg eax, ebx, ecx, edx, esi, edi */
:
);
return ret;
}
extern __inline PVOID GetFiberData(void)
{
void* ret;
__asm__ volatile ("\n\
movl %%fs:0x10,%0\n\
" : "=r" (ret) /* allow use of reg eax,ebx,ecx,edx,esi,edi */
__asm__ volatile (
"movl %%fs:0x10,%0"
: "=r" (ret) /* allow use of reg eax,ebx,ecx,edx,esi,edi */
:
);
return ret;
}
extern __inline__ PVOID 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;
}
#endif
#ifdef __cplusplus
}