diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2011-05-01 21:42:41 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2011-05-01 21:42:41 +0400 |
commit | a91ac4dca9f8edca7945593509267beff5a504fe (patch) | |
tree | ab305094a97533163362a0efcdb93ac9df1b8270 /winsup/cygwin/flock.cc | |
parent | 1112b2c38f39f33daefd03bb1eebe9e1f84eabaf (diff) |
* fhandler_windows.cc (fhandler_windows::read): Use
pthread::get_cancel_event to fetch thread's cancel event.
* flock.cc (lf_setlock): Ditto.
* posix_ipc.cc (ipc_cond_timedwait): Ditto.
* thread.cc (pthread::get_cancel_event): New static method.
* thread.h (pthread::get_cancel_event): Declare.
Diffstat (limited to 'winsup/cygwin/flock.cc')
-rw-r--r-- | winsup/cygwin/flock.cc | 5 |
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. */ |