summaryrefslogtreecommitdiff
path: root/lib/libc_r/uthread/uthread_kern.c
diff options
context:
space:
mode:
authorDavid Leonard <d@cvs.openbsd.org>1999-01-17 23:49:50 +0000
committerDavid Leonard <d@cvs.openbsd.org>1999-01-17 23:49:50 +0000
commit4a7fc69d62f684a7548d428f1a09bcefbabe0b6f (patch)
tree065c4b70643fe8a9eacbe5f48901a9cc0f0363d3 /lib/libc_r/uthread/uthread_kern.c
parent9ebd7c855719a914d8220cf8b7ab845bd006e6fc (diff)
mi+md jmp_buf; save i386s fs and gs for WINE (csapuntz@stanford.edu)
Diffstat (limited to 'lib/libc_r/uthread/uthread_kern.c')
-rw-r--r--lib/libc_r/uthread/uthread_kern.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/libc_r/uthread/uthread_kern.c b/lib/libc_r/uthread/uthread_kern.c
index 74499e597d5..8d6f58754e6 100644
--- a/lib/libc_r/uthread/uthread_kern.c
+++ b/lib/libc_r/uthread/uthread_kern.c
@@ -30,7 +30,7 @@
* SUCH DAMAGE.
*
* $FreeBSD: uthread_kern.c,v 1.15 1998/11/15 09:58:26 jb Exp $
- * $OpenBSD: uthread_kern.c,v 1.5 1999/01/10 23:16:35 d Exp $
+ * $OpenBSD: uthread_kern.c,v 1.6 1999/01/17 23:49:49 d Exp $
*
*/
#include <errno.h>
@@ -101,6 +101,20 @@ _thread_kern_sched(struct sigcontext * scp)
*/
_thread_kern_in_sched = 0;
+ if (!(_thread_run->flags & PTHREAD_AT_CANCEL_POINT) &&
+ (_thread_run->canceltype == PTHREAD_CANCEL_ASYNCHRONOUS)) {
+ /*
+ * Cancelations override signals.
+ *
+ * Stick a cancellation point at the start of
+ * each async-cancellable thread's resumption.
+ *
+ * We allow threads woken at cancel points to do their
+ * own checks.
+ */
+ _thread_cancellation_point();
+ }
+
/*
* There might be pending signals for this thread, so
* dispatch any that aren't blocked: