2007-06-22 Dick Porter <dick@ximian.com>
authorDick Porter <dick@acm.org>
Fri, 22 Jun 2007 12:43:43 +0000 (12:43 -0000)
committerDick Porter <dick@acm.org>
Fri, 22 Jun 2007 12:43:43 +0000 (12:43 -0000)
* shared.c: The non-shared mutexes weren't being initialised properly
on macos.  Fixes bug 81929.

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

mono/io-layer/ChangeLog
mono/io-layer/shared.c

index decb1a39a398a51d25f304b2b6d4fd219bac1063..a06f4ee66990a368880a1f611f6bd456adbdbccc 100644 (file)
@@ -1,3 +1,7 @@
+2007-06-22  Dick Porter  <dick@ximian.com>
+
+       * shared.c: The non-shared mutexes weren't being initialised properly
+       on macos.  Fixes bug 81929.
 
 2007-06-13  Randolph Chung  <tausq@debian.org>
 
index 17c07e42547278bbc886f02203d28d1ea29fb0ee..7833721551e148239ad05ca438ee6b7b247c8cfa 100644 (file)
@@ -450,11 +450,15 @@ again:
                munmap (tmp_shared, sizeof(struct _WapiHandleSharedLayout));
 }
 
-static mono_mutex_t noshm_sems[_WAPI_SHARED_SEM_COUNT] = {MONO_MUTEX_INITIALIZER};
+static mono_mutex_t noshm_sems[_WAPI_SHARED_SEM_COUNT];
 
 static void noshm_semaphores_init (void)
 {
-       /* No need to do anything */
+       int i;
+
+       for (i = 0; i < _WAPI_SHARED_SEM_COUNT; i++) {
+               mono_mutex_init (&noshm_sems[i], NULL);
+       }
 }
 
 static void shm_semaphores_remove (void)