diff options
author | kib <kib@FreeBSD.org> | 2015-08-17 18:34:54 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2015-08-17 18:34:54 +0000 |
commit | 48dcd99f42588bb965332b47b07569adbb788608 (patch) | |
tree | 545b0b9ce2047cef9b10983cd3f2c0befa0626da | |
parent | 70c41a2cb18dc2517295e70fd25b8fe5cbadcd4c (diff) | |
download | FreeBSD-src-48dcd99f42588bb965332b47b07569adbb788608.zip FreeBSD-src-48dcd99f42588bb965332b47b07569adbb788608.tar.gz |
MFC r286582:
Pre-resolve symbols required for the deferred signal processing.
-rw-r--r-- | lib/libthr/thread/thr_rtld.c | 7 | ||||
-rw-r--r-- | lib/libthr/thread/thr_sig.c | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/lib/libthr/thread/thr_rtld.c b/lib/libthr/thread/thr_rtld.c index 5d89988..cb20098 100644 --- a/lib/libthr/thread/thr_rtld.c +++ b/lib/libthr/thread/thr_rtld.c @@ -185,7 +185,9 @@ _thr_rtld_init(void) { struct RtldLockInfo li; struct pthread *curthread; + ucontext_t *uc; long dummy = -1; + int uc_len; curthread = _get_curthread(); @@ -231,4 +233,9 @@ _thr_rtld_init(void) _thr_signal_block(curthread); _rtld_thread_init(&li); _thr_signal_unblock(curthread); + + uc_len = __getcontextx_size(); + uc = alloca(uc_len); + getcontext(uc); + __fillcontextx2((char *)uc); } diff --git a/lib/libthr/thread/thr_sig.c b/lib/libthr/thread/thr_sig.c index a6d021f..ebb6c58 100644 --- a/lib/libthr/thread/thr_sig.c +++ b/lib/libthr/thread/thr_sig.c @@ -30,6 +30,7 @@ #include <sys/param.h> #include <sys/types.h> #include <sys/signalvar.h> +#include <sys/syscall.h> #include <signal.h> #include <errno.h> #include <stdlib.h> @@ -257,7 +258,7 @@ handle_signal(struct sigaction *actp, int sig, siginfo_t *info, ucontext_t *ucp) /* reschedule cancellation */ check_cancel(curthread, &uc2); errno = err; - __sys_sigreturn(&uc2); + syscall(SYS_sigreturn, &uc2); } void |