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);