summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2013-10-14 20:46:48 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2013-10-14 20:46:48 +0200
commitae63d465c7252602500c4de5aa2d2a99df852bfb (patch)
tree49b9b6378e489440c86cfd98fc5cf71d91d29d0b
parentad906c6eef29cb39bd674948e5ae27879ed51844 (diff)
Increase 'max count' on win32. Make linux-hack for include a little bit more generic.
-rw-r--r--src/semaphore.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/semaphore.cc b/src/semaphore.cc
index 5d90c55..47ce8e0 100644
--- a/src/semaphore.cc
+++ b/src/semaphore.cc
@@ -31,7 +31,8 @@
#ifdef WIN32
#include <windows.h>
#else
-#include </usr/include/semaphore.h>
+// Make sure we don't include /this/ file...
+#include <../include/semaphore.h>
#endif
struct semaphore_private_t {
@@ -52,7 +53,7 @@ Semaphore::Semaphore(const char *name)
#ifdef WIN32
prv->semaphore = CreateSemaphore(NULL, // default security attributes
0, // initial count
- 100000, // maximum count
+ 2147483647, // maximum count (Max LONG)
NULL); // unnamed semaphore
#else
sem_init(&prv->semaphore, 0, 0);