+
+#ifdef PLATFORM_WINDOWS
+
+int
+ProcessSemaphore::signal ()
+{
+ // non-zero on success, opposite to posix
+ return !ReleaseSemaphore(_sem, 1, NULL);
+}
+
+int
+ProcessSemaphore::wait ()
+{
+ DWORD result = 0;
+ result = WaitForSingleObject(_sem, INFINITE);
+ return (result == WAIT_OBJECT_0);
+}
+
+#endif