diff options
author | David Leonard <d@cvs.openbsd.org> | 1999-01-17 23:57:29 +0000 |
---|---|---|
committer | David Leonard <d@cvs.openbsd.org> | 1999-01-17 23:57:29 +0000 |
commit | 5ca1f71120ac2bc81b65a6cef298606b92242903 (patch) | |
tree | 82d901bf8097936d39c68cdb89cc598d1e1fccd6 /lib/libpthread/uthread/uthread_fsync.c | |
parent | 209640f64878cc32de9cf45178c9a0e979525bdd (diff) |
pthread_cancel() and cancellation points
Diffstat (limited to 'lib/libpthread/uthread/uthread_fsync.c')
-rw-r--r-- | lib/libpthread/uthread/uthread_fsync.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libpthread/uthread/uthread_fsync.c b/lib/libpthread/uthread/uthread_fsync.c index 4c953443e95..9db34f5564c 100644 --- a/lib/libpthread/uthread/uthread_fsync.c +++ b/lib/libpthread/uthread/uthread_fsync.c @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: uthread_fsync.c,v 1.2 1999/01/06 05:29:24 d Exp $ + * $OpenBSD: uthread_fsync.c,v 1.3 1999/01/17 23:57:27 d Exp $ */ #include <unistd.h> #ifdef _THREAD_SAFE @@ -41,10 +41,12 @@ fsync(int fd) { int ret; + _thread_enter_cancellation_point(); if ((ret = _FD_LOCK(fd, FD_RDWR, NULL)) == 0) { ret = _thread_sys_fsync(fd); _FD_UNLOCK(fd, FD_RDWR); } + _thread_leave_cancellation_point(); return (ret); } #endif |