summaryrefslogtreecommitdiffstats
path: root/lib/libpthread/uthread/uthread_fcntl.c
diff options
context:
space:
mode:
authord <d@openbsd.org>1999-06-09 07:16:16 +0000
committerd <d@openbsd.org>1999-06-09 07:16:16 +0000
commiteca5f508610c52f30179270812aef19f44d7823e (patch)
tree51e5a8960d96e3bdaec83f8e47a967bec0ac9280 /lib/libpthread/uthread/uthread_fcntl.c
parentsync with freebsd (diff)
downloadwireguard-openbsd-eca5f508610c52f30179270812aef19f44d7823e.tar.xz
wireguard-openbsd-eca5f508610c52f30179270812aef19f44d7823e.zip
document cancellation point handling a bit better
Diffstat (limited to 'lib/libpthread/uthread/uthread_fcntl.c')
-rw-r--r--lib/libpthread/uthread/uthread_fcntl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libpthread/uthread/uthread_fcntl.c b/lib/libpthread/uthread/uthread_fcntl.c
index 1a0a3e9548a..c1348a7b27e 100644
--- a/lib/libpthread/uthread/uthread_fcntl.c
+++ b/lib/libpthread/uthread/uthread_fcntl.c
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: uthread_fcntl.c,v 1.4 1999/01/17 23:57:27 d Exp $
+ * $OpenBSD: uthread_fcntl.c,v 1.5 1999/06/09 07:16:16 d Exp $
*/
#include <stdarg.h>
#include <unistd.h>
@@ -47,6 +47,7 @@ fcntl(int fd, int cmd,...)
int ret;
va_list ap;
+ /* This is a cancellation point: */
_thread_enter_cancellation_point();
/* Lock the file descriptor: */
@@ -137,6 +138,8 @@ fcntl(int fd, int cmd,...)
/* Unlock the file descriptor: */
_FD_UNLOCK(fd, FD_RDWR);
}
+
+ /* No longer in a cancellation point: */
_thread_leave_cancellation_point();
/* Return the completion status: */