* 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.
This commit is contained in:
@@ -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. */
|
||||
|
Reference in New Issue
Block a user