aboutsummaryrefslogtreecommitdiff
path: root/lib/libthr/thread
diff options
context:
space:
mode:
authorDavid Xu <davidxu@FreeBSD.org>2013-04-18 05:12:11 +0000
committerDavid Xu <davidxu@FreeBSD.org>2013-04-18 05:12:11 +0000
commitacad2b1e226f8fd3cf8252f5997aba94875c5cbc (patch)
tree107659e7ca960e3f74c9be96f5a0415189832b9a /lib/libthr/thread
parentb00bf67dd2f5b2ec9a0a365533a2e324a9919e03 (diff)
Notes
Diffstat (limited to 'lib/libthr/thread')
-rw-r--r--lib/libthr/thread/thr_sig.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/libthr/thread/thr_sig.c b/lib/libthr/thread/thr_sig.c
index a99395fd1b38..d2be9947ac12 100644
--- a/lib/libthr/thread/thr_sig.c
+++ b/lib/libthr/thread/thr_sig.c
@@ -737,4 +737,13 @@ _setcontext(const ucontext_t *ucp)
return __sys_setcontext(&uc);
}
-__weak_reference(__sys_swapcontext, swapcontext);
+__weak_reference(_swapcontext, swapcontext);
+int
+_swapcontext(ucontext_t *oucp, const ucontext_t *ucp)
+{
+ ucontext_t uc;
+
+ (void) memcpy(&uc, ucp, sizeof(uc));
+ remove_thr_signals(&uc.uc_sigmask);
+ return __sys_swapcontext(oucp, &uc);
+}