- i386/fiber.S: SwitchToFiber: there was data defined in the middle of the function - ooops

- thread.c: ThreadStartup: initialize error code to zero, so that void ThreadMains set the thread's exit code to something that makes sense

svn path=/trunk/; revision=4880
This commit is contained in:
KJK::Hyperion 2003-06-09 22:39:48 +00:00
parent a3048f0254
commit 649a9d362a
2 changed files with 8 additions and 8 deletions

View file

@ -1,4 +1,4 @@
/* $Id: fiber.S,v 1.1 2003/05/29 00:36:41 hyperion Exp $
/* $Id: fiber.S,v 1.2 2003/06/09 22:39:48 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
@ -15,13 +15,13 @@
.globl _SwitchToFiber@4
_SwitchToFiber@4:
ErrStr:
.ascii \
"(KERNEL32:" __FILE__ ") Saving and restoring the floating point context \
currently unimplemented\n\0"
_SwitchToFiber@4:
movl %fs:0x18, %ecx /* Teb = NtCurrentTeb() */
/* get the current fiber */
@ -35,9 +35,9 @@ currently unimplemented\n\0"
movl 0x8(%ecx), %edx
movl %edx, 0xC(%eax) /* Fiber->StackLimit = Teb->StackLimit */
movl 0xE0C(%ecx), %edx
movl %edx, 0x10(%eax) /* Fiber->StackBottom = Teb->StackBottom */
movl %edx, 0x10(%eax) /* Fiber->StackBottom = Teb->DeallocationStack */
movl 0x0(%esp), %edx
movl %edx, 0x18(%eax) /* Fiber->Eip = [esp] */
movl %edx, 0x18(%eax) /* Fiber->Eip = [esp + 0] */
movl %esp, %edx
addl $0x8, %edx
movl %edx, 0x1C(%eax) /* Fiber->Esp = esp + 8 */
@ -69,7 +69,7 @@ l_NoFloatSave:
movl 0xC(%eax), %edx
movl %edx, 0x8(%ecx) /* Teb->StackLimit = Fiber->StackLimit */
movl 0x10(%eax), %edx
movl %edx, 0xE0C(%ecx) /* Teb->StackBottom = Fiber->StackBottom */
movl %edx, 0xE0C(%ecx) /* Teb->StackBottom = Fiber->DeallocationStack */
movl 0x18(%eax), %edx /* edx = Fiber->Eip */
movl 0x1C(%eax), %esp /* esp = Fiber->Esp */
movl 0x20(%eax), %ebp /* ebp = Fiber->Ebp */

View file

@ -1,4 +1,4 @@
/* $Id: thread.c,v 1.40 2003/05/29 00:36:41 hyperion Exp $
/* $Id: thread.c,v 1.41 2003/06/09 22:39:48 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
@ -41,7 +41,7 @@ __declspec(noreturn) void STDCALL ThreadStartup
LPVOID lpParameter
)
{
UINT uExitCode;
volatile UINT uExitCode = 0;
__try1(_except_handler)
{