aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Smith <dannysmith@users.sourceforge.net>2004-01-01 11:21:48 +0000
committerDanny Smith <dannysmith@users.sourceforge.net>2004-01-01 11:21:48 +0000
commit8e2d4325246de79f4a14978e89496e720e57fb0d (patch)
tree8b8a84180859f458975a0932217fe4c79c64c96d
parent855c33f8b7c0e1266656a8921910cc19dc3014b9 (diff)
downloadnewlib-8e2d4325246de79f4a14978e89496e720e57fb0d.zip
newlib-8e2d4325246de79f4a14978e89496e720e57fb0d.tar.gz
newlib-8e2d4325246de79f4a14978e89496e720e57fb0d.tar.bz2
2004-01-01 Filip Navara <xnavara@volny.cz>
* include/winnt.h (NtCurrentTeb): Add inline definition.
-rw-r--r--winsup/w32api/ChangeLog6
-rw-r--r--winsup/w32api/include/winnt.h13
2 files changed, 18 insertions, 1 deletions
diff --git a/winsup/w32api/ChangeLog b/winsup/w32api/ChangeLog
index cc4735a..9054847 100644
--- a/winsup/w32api/ChangeLog
+++ b/winsup/w32api/ChangeLog
@@ -1,6 +1,10 @@
+2004-01-01 Filip Navara <xnavara@volny.cz>
+
+ * include/winnt.h (NtCurrentTeb): Add inline definition.
+
2004-01-01 Martin Fuchs <martin-fuchs@gmx.net>
- * include/shlobj.h (SHCoCreateInstance): Add prototype..
+ * include/shlobj.h (SHCoCreateInstance): Add prototype.
* lib/shell32.def (SHCoCreateInstance): Add export stub.
2004-01-01 Igor Pechtchanski <pechtcha@cs.nyu.edu>
diff --git a/winsup/w32api/include/winnt.h b/winsup/w32api/include/winnt.h
index 683d010..3cfa266 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);