newlib/winsup/w32api/lib/kernel32.c

52 lines
817 B
C
Raw Normal View History

2001-08-10 13:52:35 +02:00
/* extern (library) versions of inline functions defined in winnt.h */
2001-12-03 Earnie Boyd <earnie@users.sf.net> * include/accctrl.h: Change \r\n to \n. 2001-11-30 Danny Smith <dannysmith@users.sourceforge.net> * include/ipexport.h (IP_UNIDIRECTIONAL_ADAPTER_ADDRESS): Add structure definition. * include/iptypes.h (IP_PER_ADAPTER_INFO): Ditto. * include/iphlpapi.h (AddIPAddress,CreateProxyArpEntry, DeleteIPAddress,DeleteProxyArpEntry,EnableRouter, FlushIpNetTable,GetAdapterIndex,GetPerAdapterInfo, GetUniDirectionalAdapterInfo,SendARP,SetAdapterIpAddress, UnenableRouter) Declare functions. * lib/iphlpapi.def: Add function names to import lib. 2001-11-24 Danny Smith <dannysmith@users.sourceforge.net> * include/winnt.h (PACCESS_MASK): Add typedef. * include/aclapi.h: New file. * include/acctrl.h: New file. * lib/advapi32.def: Add missing symbols. * lib/test.c: Add #include <aclapi.h>. 2001-11-23 Danny Smith <dannysmith@users.sourceforge.net> * include/winbase.h (OSVERSIONINFO[AW],VER_PLATFORM_WIN32s, VER_PLATFORM_WIN32_WINDOWS,VER_PLATFORM_WIN32_NT): Move from here ... * include/winnt.h: ... to here. * include/winbase.h (VerifyVersionInfo[AW]): Add declaration. * include/winnt.h (OSVERSIONINFOEX[AW]): Add structure definitions and typedefs. (VER_NT_WORKSTATION,VER_NT_DOMAIN_CONTROLLER,VER_NT_SERVER): Add defines. 2001-11-19 Pierre Muller <muller@ics.u-strasbg.fr> * w32api/include/winnt.h: prepare SSE register support. (CONTEXT_EXTENDED_REGISTERS): Add new define. (MAXIMUM_SUPPORTED_EXTENSION): New define. (struct CONTEXT): ExtendedRegisters field added. 2001-11-16 Danny Smith <dannysmith@users.sourceforge.net> * include/winuser.h (tagALTTABINFO, tagCOMBOBOXINFO, tagCURSORINFO, tagMENUBARINFO, tagMENUINFO, tagMONITORINFO tagSCROLLBARINFO, tagTITLEBARINFO. tagWINDOWINFO, tagLASTINPUTINFO ): Define new structures. (EndMenu, GetAltTabInfo[AW],GetComboBoxInfo,GetCursorInfo, GetLastInputInfo, GetListBoxInfo, GetMenuBarInfo, GetMonitorInfo[AW], GetScrollBarInfo, GetTitleBarInfo, GetWindowInfo, GetWindowModuleFileName[AW],GetMenuInfo SetMenuInfo): Add new prototypes. * lib/user32.def: Add import stubs for above functions. * include/winuser.h (IDC_STATIC): Protect against prior definition. 2001-11-12 Corinna Vinschen <corinna@vinschen.de> * include/winbase.h (OSVERSIONINFOEX): Add definition. * include/winnt.h: Add VER_NT_* and VER_SUITE_* defines. 2001-11-10 Robert Collins <rbtcollins@hotmail.com> * include/winnt.h: Add Danny Smith's text comment about gcc compiler warnings with _AUTHORITY #defines. 2001-11-09 Robert Collins <rbtcollins@hotmail.com> * include/winnt.h (GetCurrentFiber): Create a prototype before the implementation; (GetFiberData): Ditto. 2001-11-09 Robert Collins <rbtcollins@hotmail.com> * include/winnt.h: Backout last change.
2001-12-03 20:59:34 +01:00
#if defined(__GNUC__)
2001-08-10 13:52:35 +02:00
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;
}
2001-12-03 Earnie Boyd <earnie@users.sf.net> * include/accctrl.h: Change \r\n to \n. 2001-11-30 Danny Smith <dannysmith@users.sourceforge.net> * include/ipexport.h (IP_UNIDIRECTIONAL_ADAPTER_ADDRESS): Add structure definition. * include/iptypes.h (IP_PER_ADAPTER_INFO): Ditto. * include/iphlpapi.h (AddIPAddress,CreateProxyArpEntry, DeleteIPAddress,DeleteProxyArpEntry,EnableRouter, FlushIpNetTable,GetAdapterIndex,GetPerAdapterInfo, GetUniDirectionalAdapterInfo,SendARP,SetAdapterIpAddress, UnenableRouter) Declare functions. * lib/iphlpapi.def: Add function names to import lib. 2001-11-24 Danny Smith <dannysmith@users.sourceforge.net> * include/winnt.h (PACCESS_MASK): Add typedef. * include/aclapi.h: New file. * include/acctrl.h: New file. * lib/advapi32.def: Add missing symbols. * lib/test.c: Add #include <aclapi.h>. 2001-11-23 Danny Smith <dannysmith@users.sourceforge.net> * include/winbase.h (OSVERSIONINFO[AW],VER_PLATFORM_WIN32s, VER_PLATFORM_WIN32_WINDOWS,VER_PLATFORM_WIN32_NT): Move from here ... * include/winnt.h: ... to here. * include/winbase.h (VerifyVersionInfo[AW]): Add declaration. * include/winnt.h (OSVERSIONINFOEX[AW]): Add structure definitions and typedefs. (VER_NT_WORKSTATION,VER_NT_DOMAIN_CONTROLLER,VER_NT_SERVER): Add defines. 2001-11-19 Pierre Muller <muller@ics.u-strasbg.fr> * w32api/include/winnt.h: prepare SSE register support. (CONTEXT_EXTENDED_REGISTERS): Add new define. (MAXIMUM_SUPPORTED_EXTENSION): New define. (struct CONTEXT): ExtendedRegisters field added. 2001-11-16 Danny Smith <dannysmith@users.sourceforge.net> * include/winuser.h (tagALTTABINFO, tagCOMBOBOXINFO, tagCURSORINFO, tagMENUBARINFO, tagMENUINFO, tagMONITORINFO tagSCROLLBARINFO, tagTITLEBARINFO. tagWINDOWINFO, tagLASTINPUTINFO ): Define new structures. (EndMenu, GetAltTabInfo[AW],GetComboBoxInfo,GetCursorInfo, GetLastInputInfo, GetListBoxInfo, GetMenuBarInfo, GetMonitorInfo[AW], GetScrollBarInfo, GetTitleBarInfo, GetWindowInfo, GetWindowModuleFileName[AW],GetMenuInfo SetMenuInfo): Add new prototypes. * lib/user32.def: Add import stubs for above functions. * include/winuser.h (IDC_STATIC): Protect against prior definition. 2001-11-12 Corinna Vinschen <corinna@vinschen.de> * include/winbase.h (OSVERSIONINFOEX): Add definition. * include/winnt.h: Add VER_NT_* and VER_SUITE_* defines. 2001-11-10 Robert Collins <rbtcollins@hotmail.com> * include/winnt.h: Add Danny Smith's text comment about gcc compiler warnings with _AUTHORITY #defines. 2001-11-09 Robert Collins <rbtcollins@hotmail.com> * include/winnt.h (GetCurrentFiber): Create a prototype before the implementation; (GetFiberData): Ditto. 2001-11-09 Robert Collins <rbtcollins@hotmail.com> * include/winnt.h: Backout last change.
2001-12-03 20:59:34 +01:00
#else
void* GetCurrentFiber(void)
{
void* res;
_asm {
mov eax, dword ptr fs:0x10
mov res, eax
};
return res;
}
void* GetFiberData(void)
{
void* res;
_asm {
mov eax, dword ptr fs:0x10
mov eax, [eax]
mov res, eax
};
return res;
}
#endif /* __GNUC__ */