Date: Mon, 17 Aug 2015 18:34:55 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r286853 - stable/10/lib/libthr/thread Message-ID: <201508171834.t7HIYt6E072626@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Mon Aug 17 18:34:54 2015 New Revision: 286853 URL: https://svnweb.freebsd.org/changeset/base/286853 Log: MFC r286582: Pre-resolve symbols required for the deferred signal processing. Modified: stable/10/lib/libthr/thread/thr_rtld.c stable/10/lib/libthr/thread/thr_sig.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libthr/thread/thr_rtld.c ============================================================================== --- stable/10/lib/libthr/thread/thr_rtld.c Mon Aug 17 18:33:16 2015 (r286852) +++ stable/10/lib/libthr/thread/thr_rtld.c Mon Aug 17 18:34:54 2015 (r286853) @@ -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); } Modified: stable/10/lib/libthr/thread/thr_sig.c ============================================================================== --- stable/10/lib/libthr/thread/thr_sig.c Mon Aug 17 18:33:16 2015 (r286852) +++ stable/10/lib/libthr/thread/thr_sig.c Mon Aug 17 18:34:54 2015 (r286853) @@ -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, in /* reschedule cancellation */ check_cancel(curthread, &uc2); errno = err; - __sys_sigreturn(&uc2); + syscall(SYS_sigreturn, &uc2); } void
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201508171834.t7HIYt6E072626>