From 74f9ac5be0eecef2835b0762258b44a6764000aa Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 28 Apr 2011 12:36:27 +0000 Subject: [PATCH] * posix_ipc.cc (ipc_cond_timedwait): Remove pthread_testcancel calls. (_mq_send): Add pthread_testcancel call at start of function. (_mq_receive): Ditto. --- winsup/cygwin/ChangeLog | 6 ++++++ winsup/cygwin/posix_ipc.cc | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 71c6dae49..d0c2edc8b 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +2011-04-28 Corinna Vinschen + + * posix_ipc.cc (ipc_cond_timedwait): Remove pthread_testcancel calls. + (_mq_send): Add pthread_testcancel call at start of function. + (_mq_receive): Ditto. + 2011-04-28 Corinna Vinschen * cygerrno.h (geterrno_from_nt_status): Declare. diff --git a/winsup/cygwin/posix_ipc.cc b/winsup/cygwin/posix_ipc.cc index 600fb0d19..04b3e58bc 100644 --- a/winsup/cygwin/posix_ipc.cc +++ b/winsup/cygwin/posix_ipc.cc @@ -220,7 +220,6 @@ restart1: ret = EINTR; break; case WAIT_OBJECT_0 + 2: - pthread_testcancel (); ret = ETIMEDOUT; break; default: @@ -245,7 +244,6 @@ restart1: ret = EINTR; break; case WAIT_OBJECT_0 + 2: - pthread_testcancel (); ret = ETIMEDOUT; break; default: @@ -729,6 +727,8 @@ _mq_send (mqd_t mqd, const char *ptr, size_t len, unsigned int prio, struct msg_hdr *msghdr, *nmsghdr, *pmsghdr; struct mq_info *mqinfo; + pthread_testcancel (); + myfault efault; if (efault.faulted (EBADF)) return -1; @@ -860,6 +860,8 @@ _mq_receive (mqd_t mqd, char *ptr, size_t maxlen, unsigned int *priop, struct msg_hdr *msghdr; struct mq_info *mqinfo; + pthread_testcancel (); + myfault efault; if (efault.faulted (EBADF)) return -1;