- Add TEB_SELF to asm.h
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Mon, 27 Oct 2008 02:48:54 +0000 (02:48 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Mon, 27 Oct 2008 02:48:54 +0000 (02:48 +0000)
- fix loading of TEB in fiber code
This commit is dedicated to Alex

svn path=/trunk/; revision=37008

reactos/dll/win32/kernel32/thread/i386/fiber.S
reactos/include/ndk/asm.h

index 00b3a17..decfcaa 100644 (file)
@@ -17,7 +17,7 @@
 
 _SwitchToFiber@4:
     /* Get the TEB */
-    mov edx, fs:[KGDT_R3_TEB]
+    mov edx, fs:[TEB_SELF]
     
     /* Get the Fiber */
     mov eax, [edx+TEB_FIBER_DATA]
index e95248b..3457aa2 100644 (file)
@@ -412,6 +412,7 @@ Author:
 #define TEB_STACK_BASE                          0x4
 #define TEB_STACK_LIMIT                         0x8
 #define TEB_FIBER_DATA                          0x10
+#define TEB_SELF                                0x18
 #define TEB_PEB                                 0x30
 #define TEB_EXCEPTION_CODE                      0x1A4
 #define TEB_ACTIVATION_CONTEXT_STACK_POINTER    0x1A8