From 8e2d4325246de79f4a14978e89496e720e57fb0d Mon Sep 17 00:00:00 2001 From: Danny Smith Date: Thu, 1 Jan 2004 11:21:48 +0000 Subject: 2004-01-01 Filip Navara * include/winnt.h (NtCurrentTeb): Add inline definition. --- winsup/w32api/ChangeLog | 6 +++++- winsup/w32api/include/winnt.h | 13 +++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/winsup/w32api/ChangeLog b/winsup/w32api/ChangeLog index cc4735a18..9054847af 100644 --- a/winsup/w32api/ChangeLog +++ b/winsup/w32api/ChangeLog @@ -1,6 +1,10 @@ +2004-01-01 Filip Navara + + * include/winnt.h (NtCurrentTeb): Add inline definition. + 2004-01-01 Martin Fuchs - * include/shlobj.h (SHCoCreateInstance): Add prototype.. + * include/shlobj.h (SHCoCreateInstance): Add prototype. * lib/shell32.def (SHCoCreateInstance): Add export stub. 2004-01-01 Igor Pechtchanski diff --git a/winsup/w32api/include/winnt.h b/winsup/w32api/include/winnt.h index 683d01027..3cfa2667a 100644 --- a/winsup/w32api/include/winnt.h +++ b/winsup/w32api/include/winnt.h @@ -3303,6 +3303,19 @@ extern __inline__ PVOID GetFiberData(void) return ret; } +static __inline__ struct _TEB * NtCurrentTeb(void) +{ + struct _TEB *ret; + + __asm__ __volatile__ ( + "movl %%fs:0x18, %0\n" + : "=r" (ret) + : /* no inputs */ + ); + + return ret; +} + #else extern PVOID GetCurrentFiber(void); -- cgit v1.2.3