winnt.h: Provide inline NtCurrentTeb implementation for mingw arm builds.
Based on mingw-w64. Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
0413e2a523
commit
6a05b84eca
|
@ -2675,6 +2675,13 @@ static FORCEINLINE struct _TEB * WINAPI NtCurrentTeb(void)
|
|||
{
|
||||
return (struct _TEB *)__readgsqword(FIELD_OFFSET(NT_TIB, Self));
|
||||
}
|
||||
#elif defined(__arm__) && defined(__MINGW32__)
|
||||
static FORCEINLINE struct _TEB * WINAPI NtCurrentTeb(void)
|
||||
{
|
||||
struct _TEB *teb;
|
||||
__asm__("mrc p15, 0, %0, c13, c0, 2" : "=r" (teb));
|
||||
return teb;
|
||||
}
|
||||
#else
|
||||
extern struct _TEB * WINAPI NtCurrentTeb(void);
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue