From fc8f3f5bfe691a89cc23a521c08e0128fbf8c2ae Mon Sep 17 00:00:00 2001 From: Daniel Eischen Date: Fri, 17 Dec 1999 00:57:54 +0000 Subject: 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 --- lib/libpthread/thread/thr_write.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/libpthread/thread/thr_write.c') diff --git a/lib/libpthread/thread/thr_write.c b/lib/libpthread/thread/thr_write.c index 09b09cdcfdcf..40c4cc574241 100644 --- a/lib/libpthread/thread/thr_write.c +++ b/lib/libpthread/thread/thr_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 */ -- cgit v1.2.3