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:
authorCorinna Vinschen <corinna@vinschen.de>2011-05-01 21:42:41 +0400
committerCorinna Vinschen <corinna@vinschen.de>2011-05-01 21:42:41 +0400
commita91ac4dca9f8edca7945593509267beff5a504fe (patch)
treeab305094a97533163362a0efcdb93ac9df1b8270 /winsup/cygwin/posix_ipc.cc
parent1112b2c38f39f33daefd03bb1eebe9e1f84eabaf (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/posix_ipc.cc')
-rw-r--r--winsup/cygwin/posix_ipc.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/winsup/cygwin/posix_ipc.cc b/winsup/cygwin/posix_ipc.cc
index ec6b6c76a..9f98e9d10 100644
--- a/winsup/cygwin/posix_ipc.cc
+++ b/winsup/cygwin/posix_ipc.cc
@@ -174,16 +174,13 @@ ipc_cond_init (HANDLE *pevt, const char *name, char sr)
static int
ipc_cond_timedwait (HANDLE evt, HANDLE mtx, const struct timespec *abstime)
{
- pthread_t thread;
HANDLE w4[4] = { evt, signal_arrived, NULL, NULL };
DWORD cnt = 2;
DWORD timer_idx = 0;
int ret = 0;
- 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;
if (abstime)
{
if (abstime->tv_sec < 0