summaryrefslogtreecommitdiff
path: root/lib/libpthread/uthread/uthread_poll.c
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2004-01-01 08:19:34 +0000
committerBrad Smith <brad@cvs.openbsd.org>2004-01-01 08:19:34 +0000
commit630d54740ac81f7aa979b32790aeeaac07055c46 (patch)
treedd7ce4272969cbedcb1db6c180059eee3e604f2e /lib/libpthread/uthread/uthread_poll.c
parent2c8cae96fba5cba8184ba9a45b45bef097c939bf (diff)
more cancellation points.
ok marc@
Diffstat (limited to 'lib/libpthread/uthread/uthread_poll.c')
-rw-r--r--lib/libpthread/uthread/uthread_poll.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/libpthread/uthread/uthread_poll.c b/lib/libpthread/uthread/uthread_poll.c
index 239b3f62da6..a2b42219d41 100644
--- a/lib/libpthread/uthread/uthread_poll.c
+++ b/lib/libpthread/uthread/uthread_poll.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uthread_poll.c,v 1.8 2003/12/10 23:10:08 millert Exp $ */
+/* $OpenBSD: uthread_poll.c,v 1.9 2004/01/01 08:19:33 brad Exp $ */
/*
* Copyright (c) 1999 Daniel Eischen <eischen@vigrid.com>
* All rights reserved.
@@ -53,6 +53,9 @@ poll(struct pollfd fds[], nfds_t nfds, int timeout)
int i, ret = 0;
struct pthread_poll_data data;
+ /* This is a cancellation point: */
+ _thread_enter_cancellation_point();
+
if (numfds > _thread_dtablesize) {
numfds = _thread_dtablesize;
}
@@ -96,6 +99,9 @@ poll(struct pollfd fds[], nfds_t nfds, int timeout)
}
}
+ /* No longer in a cancellation point: */
+ _thread_leave_cancellation_point();
+
return (ret);
}
#endif