diff options
author | deischen <deischen@FreeBSD.org> | 1999-12-17 00:57:54 +0000 |
---|---|---|
committer | deischen <deischen@FreeBSD.org> | 1999-12-17 00:57:54 +0000 |
commit | 8456ca731197cd424e1d5a70363f568d2424d38b (patch) | |
tree | 6af52cbde8a6b3b4543c13ca8f8c2a579020ecd5 /lib/libc_r/uthread/uthread_write.c | |
parent | 17ee572a14054fb3c892f9dc5ee491e75bc8f3f5 (diff) | |
download | FreeBSD-src-8456ca731197cd424e1d5a70363f568d2424d38b.zip FreeBSD-src-8456ca731197cd424e1d5a70363f568d2424d38b.tar.gz |
Fix problems with cancellation while in critical regions.
o Cancellation flags were not getting properly set/cleared.
o Loops waiting for internal locks were not being exited
correctly by a cancelled thread.
o Minor spelling (cancelation -> cancellation) and formatting
corrections (missing tab).
Found by: tg
Reviewed by: jasone
Diffstat (limited to 'lib/libc_r/uthread/uthread_write.c')
-rw-r--r-- | lib/libc_r/uthread/uthread_write.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc_r/uthread/uthread_write.c b/lib/libc_r/uthread/uthread_write.c index 09b09cd..40c4cc5 100644 --- a/lib/libc_r/uthread/uthread_write.c +++ b/lib/libc_r/uthread/uthread_write.c @@ -67,8 +67,8 @@ write(int fd, const void *buf, size_t nbytes) /* File is not open for write: */ errno = EBADF; _FD_UNLOCK(fd, FD_WRITE); - _thread_leave_cancellation_point(); - return (-1); + _thread_leave_cancellation_point(); + return (-1); } /* Check if file operations are to block */ |