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:
Diffstat (limited to 'winsup/cygwin/thread.cc')
-rw-r--r--winsup/cygwin/thread.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc
index 87167b7f9..2bd50658c 100644
--- a/winsup/cygwin/thread.cc
+++ b/winsup/cygwin/thread.cc
@@ -3209,11 +3209,14 @@ semaphore::_terminate ()
int
semaphore::init (sem_t *sem, int pshared, unsigned int value)
{
- /* opengroup calls this undefined */
+ /*
+ We can't tell the difference between reinitialising an
+ existing semaphore and initialising a semaphore who's
+ contents happen to be a valid pointer
+ */
if (is_good_object (sem))
{
- set_errno(EBUSY);
- return -1;
+ paranoid_printf ("potential attempt to reinitialise a semaphore");
}
if (value > SEM_VALUE_MAX)