diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2001-08-11 15:01:58 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2001-08-11 15:01:58 +0000 |
commit | c1387781bf65679709acc9445d3d74b54cca383a (patch) | |
tree | b7d98abf543c403e18b8b9df68407592e0fd215a | |
parent | 55a744f852df69ec59a78b0045492d9bdf87306f (diff) |
add missing _thread_enter_cancellation_point() before going further.
-rw-r--r-- | lib/libc_r/uthread/uthread_write.c | 5 | ||||
-rw-r--r-- | lib/libpthread/uthread/uthread_write.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/libc_r/uthread/uthread_write.c b/lib/libc_r/uthread/uthread_write.c index 42a1f193243..05c83bbcd22 100644 --- a/lib/libc_r/uthread/uthread_write.c +++ b/lib/libc_r/uthread/uthread_write.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uthread_write.c,v 1.6 2000/01/06 07:23:24 d Exp $ */ +/* $OpenBSD: uthread_write.c,v 1.7 2001/08/11 15:01:57 fgsch Exp $ */ /* * Copyright (c) 1995-1998 John Birrell <jb@cimlogic.com.au> * All rights reserved. @@ -51,6 +51,9 @@ write(int fd, const void *buf, size_t nbytes) ssize_t num = 0; ssize_t ret; + /* This is a cancellation point: */ + _thread_enter_cancellation_point(); + /* POSIX says to do just this: */ if (nbytes == 0) ret = 0; diff --git a/lib/libpthread/uthread/uthread_write.c b/lib/libpthread/uthread/uthread_write.c index 42a1f193243..05c83bbcd22 100644 --- a/lib/libpthread/uthread/uthread_write.c +++ b/lib/libpthread/uthread/uthread_write.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uthread_write.c,v 1.6 2000/01/06 07:23:24 d Exp $ */ +/* $OpenBSD: uthread_write.c,v 1.7 2001/08/11 15:01:57 fgsch Exp $ */ /* * Copyright (c) 1995-1998 John Birrell <jb@cimlogic.com.au> * All rights reserved. @@ -51,6 +51,9 @@ write(int fd, const void *buf, size_t nbytes) ssize_t num = 0; ssize_t ret; + /* This is a cancellation point: */ + _thread_enter_cancellation_point(); + /* POSIX says to do just this: */ if (nbytes == 0) ret = 0; |