Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/flock.cc')
-rw-r--r--winsup/cygwin/flock.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/winsup/cygwin/flock.cc b/winsup/cygwin/flock.cc
index b4ef9e6a9..426b1044f 100644
--- a/winsup/cygwin/flock.cc
+++ b/winsup/cygwin/flock.cc
@@ -958,10 +958,7 @@ lf_setlock (lockf_t *lock, inode_t *node, lockf_t **clean, HANDLE fhdl)
return EDEADLK;
}
- pthread_t thread = pthread::self ();
- HANDLE cancel_event = (thread && thread->cancel_event
- && thread->cancelstate != PTHREAD_CANCEL_DISABLE)
- ? thread->cancel_event : NULL;
+ HANDLE cancel_event = pthread::get_cancel_event ();
int wait_count = 0;
/* The lock is always the first object. */