diff options
Diffstat (limited to 'lib/libc/amd64/gen')
-rw-r--r-- | lib/libc/amd64/gen/_setjmp.S | 7 | ||||
-rw-r--r-- | lib/libc/amd64/gen/setjmp.S | 18 | ||||
-rw-r--r-- | lib/libc/amd64/gen/sigsetjmp.S | 21 |
3 files changed, 10 insertions, 36 deletions
diff --git a/lib/libc/amd64/gen/_setjmp.S b/lib/libc/amd64/gen/_setjmp.S index 9c66308..5932fee 100644 --- a/lib/libc/amd64/gen/_setjmp.S +++ b/lib/libc/amd64/gen/_setjmp.S @@ -66,12 +66,9 @@ ENTRY(_setjmp) xorl %eax,%eax ret -#ifdef _THREAD_SAFE + .weak CNAME(_longjmp) + .set CNAME(_longjmp),CNAME(___longjmp) ENTRY(___longjmp) -#else -ALTENTRY(___longjmp) -ENTRY(_longjmp) -#endif movl 4(%esp),%edx movl 8(%esp),%eax movl 0(%edx),%ecx diff --git a/lib/libc/amd64/gen/setjmp.S b/lib/libc/amd64/gen/setjmp.S index 738407a..5e92c97 100644 --- a/lib/libc/amd64/gen/setjmp.S +++ b/lib/libc/amd64/gen/setjmp.S @@ -61,11 +61,7 @@ ENTRY(setjmp) pushl %eax /* (sigset_t*)oset */ pushl $0 /* (sigset_t*)set */ pushl $1 /* SIG_BLOCK */ -#ifdef _THREAD_SAFE - call PIC_PLT(CNAME(_thread_sys_sigprocmask)) -#else - call PIC_PLT(CNAME(sigprocmask)) -#endif + call PIC_PLT(CNAME(_sigprocmask)) addl $12,%esp PIC_EPILOGUE movl 4(%esp),%ecx @@ -80,10 +76,8 @@ ENTRY(setjmp) xorl %eax,%eax ret -#ifndef _THREAD_SAFE -.weak CNAME(longjmp); -.set CNAME(longjmp),CNAME(__longjmp); -#endif + .weak CNAME(longjmp) + .set CNAME(longjmp),CNAME(__longjmp) ENTRY(__longjmp) movl 4(%esp),%edx PIC_PROLOGUE @@ -91,11 +85,7 @@ ENTRY(__longjmp) leal 28(%edx), %eax pushl %eax /* (sigset_t*)set */ pushl $3 /* SIG_SETMASK */ -#ifdef _THREAD_SAFE - call PIC_PLT(CNAME(_thread_sys_sigprocmask)) -#else - call PIC_PLT(CNAME(sigprocmask)) -#endif + call PIC_PLT(CNAME(_sigprocmask)) addl $12,%esp PIC_EPILOGUE movl 4(%esp),%edx diff --git a/lib/libc/amd64/gen/sigsetjmp.S b/lib/libc/amd64/gen/sigsetjmp.S index 40aebb6..96aae68 100644 --- a/lib/libc/amd64/gen/sigsetjmp.S +++ b/lib/libc/amd64/gen/sigsetjmp.S @@ -52,9 +52,6 @@ * the renamed functions (introduced in gcc-2.5.3; previous versions * only supported *jmp with 0 or 1 leading underscores). * - * Use sigprocmask() instead of sigblock() and sigsetmask(), and - * check for and handle errors. - * * Restore _all_ the registers and the signal mask atomically. Can * use sigreturn() if sigreturn() works. */ @@ -70,11 +67,7 @@ ENTRY(sigsetjmp) pushl %eax /* (sigset_t*)oset */ pushl $0 /* (sigset_t*)set */ pushl $1 /* SIG_BLOCK */ -#ifdef _THREAD_SAFE - call PIC_PLT(CNAME(_thread_sys_sigprocmask)) -#else - call PIC_PLT(CNAME(sigprocmask)) -#endif + call PIC_PLT(CNAME(_sigprocmask)) addl $12,%esp PIC_EPILOGUE movl 4(%esp),%ecx @@ -89,10 +82,8 @@ ENTRY(sigsetjmp) xorl %eax,%eax ret -#ifndef _THREAD_SAFE -.weak CNAME(siglongjmp); -.set CNAME(siglongjmp),CNAME(__siglongjmp); -#endif + .weak CNAME(siglongjmp); + .set CNAME(siglongjmp),CNAME(__siglongjmp); ENTRY(__siglongjmp); movl 4(%esp),%edx cmpl $0,44(%edx) @@ -102,11 +93,7 @@ ENTRY(__siglongjmp); leal 28(%edx), %eax pushl %eax /* (sigset_t*)set */ pushl $3 /* SIG_SETMASK */ -#ifdef _THREAD_SAFE - call PIC_PLT(CNAME(_thread_sys_sigprocmask)) -#else - call PIC_PLT(CNAME(sigprocmask)) -#endif + call PIC_PLT(CNAME(_sigprocmask)) addl $12,%esp PIC_EPILOGUE movl 4(%esp),%edx |