summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/thread.h
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2011-03-29 07:49:25 +0000
committerCorinna Vinschen <corinna@vinschen.de>2011-03-29 07:49:25 +0000
commit056b8e60cda1874626c9592ef59c48d4c351a315 (patch)
tree1a8558a7bbaa7b0da2be0d5468d74a97d16624d2 /winsup/cygwin/thread.h
parent471bbbe240f91c67130e965208db8b245ca9d429 (diff)
downloadcygnal-056b8e60cda1874626c9592ef59c48d4c351a315.tar.gz
cygnal-056b8e60cda1874626c9592ef59c48d4c351a315.tar.bz2
cygnal-056b8e60cda1874626c9592ef59c48d4c351a315.zip
* thread.cc (semaphore::init, destroy, close): Standards conformance
fix. On a failure, return -1 and set errno. * thread.h (semaphore::terminate): Save errno since semaphore::close() may now modify it.
Diffstat (limited to 'winsup/cygwin/thread.h')
-rw-r--r--winsup/cygwin/thread.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/winsup/cygwin/thread.h b/winsup/cygwin/thread.h
index 62bd1b959..bea8e2aa3 100644
--- a/winsup/cygwin/thread.h
+++ b/winsup/cygwin/thread.h
@@ -21,6 +21,7 @@ details. */
#include <limits.h>
#include "security.h"
#include <errno.h>
+#include "cygerrno.h"
enum cw_sig_wait
{
@@ -641,6 +642,7 @@ public:
}
static void terminate ()
{
+ save_errno save;
semaphores.for_each (&semaphore::_terminate);
}