mirror of
https://github.com/reactos/reactos.git
synced 2024-11-05 22:26:39 +00:00
c2d0d784c7
- Create a branch to do a proper merge of USB work from a trunk base instead of from cmake-bringup - In the future, DO NOT under any circumstances branch another branch. This leads to merge problems! svn path=/branches/usb-bringup-trunk/; revision=55018
30 lines
607 B
C
30 lines
607 B
C
#ifndef _INLINE_NT_CURRENTTEB_H_
|
|
#define _INLINE_NT_CURRENTTEB_H_
|
|
|
|
#if defined(_M_IX86)
|
|
FORCEINLINE struct _TEB * NtCurrentTeb(void)
|
|
{
|
|
return (struct _TEB *)__readfsdword(0x18);
|
|
}
|
|
#elif defined(_M_ARM)
|
|
|
|
//
|
|
// NT-ARM is not documented
|
|
//
|
|
#include <armddk.h>
|
|
|
|
#elif defined(_M_AMD64)
|
|
FORCEINLINE struct _TEB * NtCurrentTeb(void)
|
|
{
|
|
return (struct _TEB *)__readgsqword(FIELD_OFFSET(NT_TIB, Self));
|
|
}
|
|
#elif defined(_M_PPC)
|
|
FORCEINLINE struct _TEB * NtCurrentTeb(void)
|
|
{
|
|
return (struct _TEB *)__readfsdword_winnt(0x18);
|
|
}
|
|
#else
|
|
#error Unsupported architecture
|
|
#endif
|
|
|
|
#endif//_INLINE_NT_CURRENTTEB_H_
|