2009-07-20 Geoff Norton <gnorton@novell.com>
authorGeoff Norton <grompf@sublimeintervention.com>
Mon, 20 Jul 2009 15:06:42 +0000 (15:06 -0000)
committerGeoff Norton <grompf@sublimeintervention.com>
Mon, 20 Jul 2009 15:06:42 +0000 (15:06 -0000)
        * thread-private.h: Use the new mono-semaphore.h.

svn path=/trunk/mono/; revision=138213

mono/io-layer/ChangeLog
mono/io-layer/thread-private.h

index 2086a29e8a768a890deeae82c45903ce6d51c2ba..aee282e2548ef48214198d603e39267de9846619 100644 (file)
@@ -1,3 +1,7 @@
+2009-07-20  Geoff Norton  <gnorton@novell.com>
+
+       * thread-private.h: Use the new mono-semaphore.h.
+
 2009-06-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
 
        * sockets.c: add the error number to the message so we can figure out
index 1eef0669b977bcd1db1a6431961fcaa85e85bf18..1c62618c8128c69712d301a40e178fcc5af648d0 100644 (file)
 #include <config.h>
 #include <glib.h>
 #include <pthread.h>
-#ifdef HAVE_SEMAPHORE_H
-#include <semaphore.h>
-#endif
-
-#ifdef USE_MACH_SEMA
-#  include <mach/mach_init.h>
-#  include <mach/task.h>
-#  include <mach/semaphore.h>
-
-typedef semaphore_t MonoSemType;
-#  define MONO_SEM_INIT(addr,value) semaphore_create (current_task (), (addr), SYNC_POLICY_FIFO, (value))
-#  define MONO_SEM_WAIT(sem) semaphore_wait (*(sem))
-#  define MONO_SEM_POST(sem) semaphore_signal (*(sem))
-#  define MONO_SEM_DESTROY(sem) semaphore_destroy (current_task (), *(sem))
-#else
-
-typedef sem_t MonoSemType;
-#  define MONO_SEM_INIT(addr,value) sem_init ((addr), 0, (value))
-#  define MONO_SEM_WAIT(sem) sem_wait ((sem))
-#  define MONO_SEM_POST(sem) sem_post ((sem))
-#  define MONO_SEM_DESTROY(sem) sem_destroy ((sem))
-#endif
+#include <mono/utils/mono-semaphore.h>
 
 /* There doesn't seem to be a defined symbol for this */
 #define _WAPI_THREAD_CURRENT (gpointer)0xFFFFFFFE