* 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.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user