summaryrefslogtreecommitdiff
path: root/lib/libpthread/uthread/uthread_sigwait.c
diff options
context:
space:
mode:
authorDavid Leonard <d@cvs.openbsd.org>1999-06-09 07:16:18 +0000
committerDavid Leonard <d@cvs.openbsd.org>1999-06-09 07:16:18 +0000
commit5b25504c910ae952393636884728bb911ccd8733 (patch)
tree883d88f07de3449ef2ca038b75c007b57ce95e3d /lib/libpthread/uthread/uthread_sigwait.c
parent26ab430a80ba9c64b06a358f6b69d491a912f54a (diff)
document cancellation point handling a bit better
Diffstat (limited to 'lib/libpthread/uthread/uthread_sigwait.c')
-rw-r--r--lib/libpthread/uthread/uthread_sigwait.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libpthread/uthread/uthread_sigwait.c b/lib/libpthread/uthread/uthread_sigwait.c
index b4277133310..00cf99ef20b 100644
--- a/lib/libpthread/uthread/uthread_sigwait.c
+++ b/lib/libpthread/uthread/uthread_sigwait.c
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: uthread_sigwait.c,v 1.5 1999/05/26 00:18:26 d Exp $
+ * $OpenBSD: uthread_sigwait.c,v 1.6 1999/06/09 07:16:17 d Exp $
*/
#include <signal.h>
#include <errno.h>
@@ -45,7 +45,9 @@ sigwait(const sigset_t * set, int *sig)
sigset_t tempset;
struct sigaction act;
+ /* This is a cancellation point: */
_thread_enter_cancellation_point();
+
/*
* Specify the thread kernel signal handler.
*/
@@ -76,6 +78,7 @@ sigwait(const sigset_t * set, int *sig)
/* Return the signal number to the caller: */
*sig = i;
+ /* No longer in a cancellation point: */
_thread_leave_cancellation_point();
return (0);
}
@@ -129,6 +132,7 @@ sigwait(const sigset_t * set, int *sig)
}
}
+ /* No longer in a cancellation point: */
_thread_leave_cancellation_point();
/* Return the completion status: */