[PSDK/NDK]
[reactos.git] / reactos / include / ndk / psfuncs.h
index ff33730..49c7b9f 100644 (file)
@@ -143,7 +143,7 @@ NTAPI
 PsGetCurrentProcessSessionId(
     VOID
 );
-    
+
 //
 // Process Impersonation Functions
 //
@@ -371,7 +371,18 @@ NtCreateThread(
     IN BOOLEAN CreateSuspended
 );
 
-#include "inline_ntcurrentteb.h"
+#ifndef NTOS_MODE_USER
+FORCEINLINE struct _TEB * NtCurrentTeb(VOID)
+{
+#if defined(_M_IX86)
+    return (PTEB)__readfsdword(0x18);
+#elif defined (_M_AMD64)
+    return (struct _TEB *)__readgsqword(FIELD_OFFSET(NT_TIB, Self));
+#endif
+}
+#else
+struct _TEB * NtCurrentTeb(void);
+#endif
 
 NTSYSCALLAPI
 NTSTATUS