From: Kees Jongenburger Date: Mon, 24 Mar 2014 15:16:21 +0000 (+0100) Subject: x86:ensure that getcontext will return 0. X-Git-Tag: v3.3.0~375 X-Git-Url: http://zhaoyanbai.com/repos/dnssec-signzone.html?a=commitdiff_plain;h=69b8ce6ab27810d8eb2265c0979c4fd8a5bf4f03;p=minix.git x86:ensure that getcontext will return 0. The setcontext method did not alway set the return value to 0 after restoring the desired context. Specially When calling setcontext with the _UC_IGNSIGM and the _UC_IGNFPU flags the return value would be non zero. Change-Id: Iec7f8d6a680950aa53e3c88c86e03f65005e66b2 --- diff --git a/lib/libc/arch/i386/sys-minix/ucontext.S b/lib/libc/arch/i386/sys-minix/ucontext.S index 459d2dcb6..92ec539d6 100644 --- a/lib/libc/arch/i386/sys-minix/ucontext.S +++ b/lib/libc/arch/i386/sys-minix/ucontext.S @@ -108,6 +108,7 @@ ENTRY(setcontext) mov SI(%edx), %esi /* Restore ESI */ mov BP(%edx), %ebp /* Restore EBP */ mov SP(%edx), %esp /* Restore stack pointer */ + xor %eax, %eax /* Return 0 */ jmp *PC(%edx) /* Return to RTA */ /* void ctx_start((void *func)(int arg1, ..., argn), arg1, ..., argn,