diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2015-02-25 17:50:13 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2015-02-25 17:50:13 +0000 |
commit | 0066e440c1398326e7d6ca43fae630b46a1b5a2d (patch) | |
tree | 5c66f63ffb4a9ee1567aa6f6e7c5ac87dec238dc | |
parent | e93954138f44023f4d1d75c3e572295d8230acad (diff) | |
download | cygnal-0066e440c1398326e7d6ca43fae630b46a1b5a2d.tar.gz cygnal-0066e440c1398326e7d6ca43fae630b46a1b5a2d.tar.bz2 cygnal-0066e440c1398326e7d6ca43fae630b46a1b5a2d.zip |
* fhandler_tape.cc (fhandler_dev_tape::_lock): Add cw_sig_restart to
cygwait call.
* thread.cc (pthread_mutex::lock): Ditto.
(semaphore::_timedwait): Fix formatting.
(semaphore::_wait): Ditto.
* thread.h (fast_mutex::lock): Ditto.
...and fix ChangeLog accordingly.
-rw-r--r-- | winsup/cygwin/ChangeLog | 16 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_tape.cc | 5 | ||||
-rw-r--r-- | winsup/cygwin/thread.cc | 9 | ||||
-rw-r--r-- | winsup/cygwin/thread.h | 4 |
4 files changed, 19 insertions, 15 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 4b3f7de74..65d002bd9 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,14 @@ 2015-02-25 Corinna Vinschen <corinna@vinschen.de> + * fhandler_tape.cc (fhandler_dev_tape::_lock): Add cw_sig_restart to + cygwait call. + * thread.cc (pthread_mutex::lock): Ditto. + (semaphore::_timedwait): Fix formatting. + (semaphore::_wait): Ditto. + * thread.h (fast_mutex::lock): Ditto. + +2015-02-25 Corinna Vinschen <corinna@vinschen.de> + * security.cc (alloc_sd): Don't apply temporary workaround for chmod to DEF_USER_OBJ, DEF_GROUP_OBJ, and DEF_OTHER_OBJ ACEs. @@ -10,13 +19,6 @@ 2015-02-25 Corinna Vinschen <corinna@vinschen.de> - * fhandler_tape.cc (fhandler_dev_tape::_lock): Add cw_sig_restart to - cygwait call. - * thread.cc (pthread_mutex::lock): Ditto. - * thread.h (fast_mutex::lock): Ditto. - -2015-02-25 Corinna Vinschen <corinna@vinschen.de> - * security.cc (alloc_sd): Fix comment style. Remove code unused for years. diff --git a/winsup/cygwin/fhandler_tape.cc b/winsup/cygwin/fhandler_tape.cc index 5b09e4262..b24a0ee58 100644 --- a/winsup/cygwin/fhandler_tape.cc +++ b/winsup/cygwin/fhandler_tape.cc @@ -2,7 +2,7 @@ classes. Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, - 2010, 2011, 2012, 2013, 2014 Red Hat, Inc. + 2010, 2011, 2012, 2013, 2014, 2015 Red Hat, Inc. This file is part of Cygwin. @@ -1160,7 +1160,8 @@ fhandler_dev_tape::_lock (bool cancelable) /* O_NONBLOCK is only valid in a read or write call. Only those are cancelable. */ DWORD timeout = cancelable && is_nonblocking () ? 0 : INFINITE; - switch (cygwait (mt_mtx, timeout, cw_sig | cw_cancel | cw_cancel_self)) + switch (cygwait (mt_mtx, timeout, + cw_sig | cw_sig_restart | cw_cancel | cw_cancel_self)) { case WAIT_OBJECT_0: return true; diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc index a08a733d7..9320868f5 100644 --- a/winsup/cygwin/thread.cc +++ b/winsup/cygwin/thread.cc @@ -1760,8 +1760,7 @@ pthread_mutex::lock () else if (type == PTHREAD_MUTEX_NORMAL /* potentially causes deadlock */ || !pthread::equal (owner, self)) { - /* FIXME: no cancel? */ - cygwait (win32_obj_id, cw_infinite, cw_sig); + cygwait (win32_obj_id, cw_infinite, cw_sig | cw_sig_restart); set_owner (self); } else @@ -3518,7 +3517,8 @@ semaphore::_timedwait (const struct timespec *abstime) timeout.QuadPart = abstime->tv_sec * NSPERSEC + (abstime->tv_nsec + 99) / 100 + FACTOR; - switch (cygwait (win32_obj_id, &timeout, cw_cancel | cw_cancel_self | cw_sig_eintr)) + switch (cygwait (win32_obj_id, &timeout, + cw_cancel | cw_cancel_self | cw_sig_eintr)) { case WAIT_OBJECT_0: break; @@ -3551,7 +3551,8 @@ semaphore::_timedwait (const struct timespec *abstime) int semaphore::_wait () { - switch (cygwait (win32_obj_id, cw_infinite, cw_cancel | cw_cancel_self | cw_sig_eintr)) + switch (cygwait (win32_obj_id, cw_infinite, + cw_cancel | cw_cancel_self | cw_sig_eintr)) { case WAIT_OBJECT_0: break; diff --git a/winsup/cygwin/thread.h b/winsup/cygwin/thread.h index badffcb79..3650e9509 100644 --- a/winsup/cygwin/thread.h +++ b/winsup/cygwin/thread.h @@ -1,7 +1,7 @@ /* thread.h: Locking and threading module definitions Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, - 2010, 2011, 2012, 2013 Red Hat, Inc. + 2010, 2011, 2012, 2013, 2014, 2015 Red Hat, Inc. This file is part of Cygwin. @@ -60,7 +60,7 @@ public: void lock () { if (InterlockedIncrement (&lock_counter) != 1) - cygwait (win32_obj_id, cw_infinite, cw_sig); + cygwait (win32_obj_id, cw_infinite, cw_sig | cw_sig_restart); } void unlock () |