* 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:
@@ -98,10 +98,8 @@ fhandler_windows::read (void *buf, size_t& len)
|
||||
|
||||
HANDLE w4[3] = { get_handle (), signal_arrived, NULL };
|
||||
DWORD cnt = 2;
|
||||
pthread_t thread = pthread::self ();
|
||||
if (thread && thread->cancel_event
|
||||
&& thread->cancelstate != PTHREAD_CANCEL_DISABLE)
|
||||
w4[cnt++] = thread->cancel_event;
|
||||
if ((w4[cnt] = pthread::get_cancel_event ()) != NULL)
|
||||
++cnt;
|
||||
restart:
|
||||
switch (MsgWaitForMultipleObjectsEx (cnt, w4,
|
||||
is_nonblocking () ? 0 : INFINITE,
|
||||
|
Reference in New Issue
Block a user