From ebabf50a029c6dfde3e5eb7beb99687b4c3193f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sat, 3 Feb 2007 18:30:24 +0000 Subject: [PATCH] x86_userspace_thread_exit() did not correctly setup the stack for the syscall. I don't know why (or how) it could work before r19775, though. This fixes the wrong return code from wait_for_thread() in most cases, and thus, bug #1011. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20060 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/arch/x86/arch_x86.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/system/kernel/arch/x86/arch_x86.S b/src/system/kernel/arch/x86/arch_x86.S index 71cda78a4d..97e591bed2 100644 --- a/src/system/kernel/arch/x86/arch_x86.S +++ b/src/system/kernel/arch/x86/arch_x86.S @@ -130,9 +130,10 @@ FUNCTION(i386_swap_pgdir): .align 4 FUNCTION(x86_userspace_thread_exit): pushl %eax + sub $4, %esp movl $1, %ecx lea (%esp), %edx - movl $SYSCALL_EXIT_THREAD, %eax; + movl $SYSCALL_EXIT_THREAD, %eax int $99 .align 4 FUNCTION(x86_end_userspace_thread_exit):