summaryrefslogtreecommitdiffstats
path: root/lib/libthr
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2013-06-03 04:22:42 +0000
committerkib <kib@FreeBSD.org>2013-06-03 04:22:42 +0000
commitf82ed4d643eddd388a9dc1b638f889a83c397012 (patch)
tree9221b2568aebb3f4d305a904c687bbc18cd1ecae /lib/libthr
parentce0f25b29f5700a93d58d1fd3c36006da4be15b9 (diff)
downloadFreeBSD-src-f82ed4d643eddd388a9dc1b638f889a83c397012.zip
FreeBSD-src-f82ed4d643eddd388a9dc1b638f889a83c397012.tar.gz
Since the cause of the problems with the __fillcontextx() was
identified, unify the code of check_deferred_signal() for all architectures, making the variant under #ifdef x86 common. Tested by: marius (sparc64) Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
Diffstat (limited to 'lib/libthr')
-rw-r--r--lib/libthr/thread/thr_sig.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/lib/libthr/thread/thr_sig.c b/lib/libthr/thread/thr_sig.c
index 4dbb252..415ddb0 100644
--- a/lib/libthr/thread/thr_sig.c
+++ b/lib/libthr/thread/thr_sig.c
@@ -318,31 +318,23 @@ check_deferred_signal(struct pthread *curthread)
ucontext_t *uc;
struct sigaction act;
siginfo_t info;
+ int uc_len;
if (__predict_true(curthread->deferred_siginfo.si_signo == 0))
return;
-#if defined(__amd64__) || defined(__i386__)
- int uc_len;
uc_len = __getcontextx_size();
uc = alloca(uc_len);
getcontext(uc);
if (curthread->deferred_siginfo.si_signo == 0)
return;
__fillcontextx2((char *)uc);
-#else
- ucontext_t ucv;
- uc = &ucv;
- getcontext(uc);
-#endif
- if (curthread->deferred_siginfo.si_signo != 0) {
- act = curthread->deferred_sigact;
- uc->uc_sigmask = curthread->deferred_sigmask;
- memcpy(&info, &curthread->deferred_siginfo, sizeof(siginfo_t));
- /* remove signal */
- curthread->deferred_siginfo.si_signo = 0;
- handle_signal(&act, info.si_signo, &info, uc);
- }
+ act = curthread->deferred_sigact;
+ uc->uc_sigmask = curthread->deferred_sigmask;
+ memcpy(&info, &curthread->deferred_siginfo, sizeof(siginfo_t));
+ /* remove signal */
+ curthread->deferred_siginfo.si_signo = 0;
+ handle_signal(&act, info.si_signo, &info, uc);
}
static void
OpenPOWER on IntegriCloud