diff options
author | 2001-08-30 17:47:57 +0000 | |
---|---|---|
committer | 2001-08-30 17:47:57 +0000 | |
commit | cd74a012b845ae044cd9f1e0ae04b79ba469b17c (patch) | |
tree | 96905b28700700d58fd75b2a3cd649fd47e7510b /lib/libpthread/uthread/uthread_cancel.c | |
parent | o kill register (diff) | |
download | wireguard-openbsd-cd74a012b845ae044cd9f1e0ae04b79ba469b17c.tar.xz wireguard-openbsd-cd74a012b845ae044cd9f1e0ae04b79ba469b17c.zip |
Back out fgsch@'s tree breaking commits.
Test next time, ok?
Diffstat (limited to 'lib/libpthread/uthread/uthread_cancel.c')
-rw-r--r-- | lib/libpthread/uthread/uthread_cancel.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/libpthread/uthread/uthread_cancel.c b/lib/libpthread/uthread/uthread_cancel.c index 7b157c2b53e..8700d3e68b6 100644 --- a/lib/libpthread/uthread/uthread_cancel.c +++ b/lib/libpthread/uthread/uthread_cancel.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uthread_cancel.c,v 1.4 2001/08/30 07:40:47 fgsch Exp $ */ +/* $OpenBSD: uthread_cancel.c,v 1.5 2001/08/30 17:47:57 todd Exp $ */ /* * David Leonard <d@openbsd.org>, 1999. Public domain. */ @@ -12,10 +12,7 @@ pthread_cancel(pthread) { int ret; - if ((ret = _find_thread(pthread)) != 0) { - /* NOTHING */ - } else if (pthread->state == PS_DEAD || pthread->state == PS_DEADLOCK) { - ret = 0; + if ((ret = _find_thread(pthread))) { } else if ((pthread->flags & PTHREAD_FLAGS_CANCELED) == 0) { /* Set the thread's I've-been-cancelled flag: */ pthread->flags |= PTHREAD_FLAGS_CANCELED; |