Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2010-01-16 03:45:08 +0300
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2010-01-16 03:45:08 +0300
commitf20a93692670b2e3b9040a0b91ab258fad91a499 (patch)
treeee5363065b1d5b00e0f4e8f8462e2ceead974422 /libgc/misc.c
parent866bd6ea3e689620a3510e6a1725d7ea928344f6 (diff)
A few additions to better support PS3.
Patch by Miguel. svn path=/trunk/mono/; revision=149670
Diffstat (limited to 'libgc/misc.c')
-rw-r--r--libgc/misc.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/libgc/misc.c b/libgc/misc.c
index 22fc564c895..e21db5b3209 100644
--- a/libgc/misc.c
+++ b/libgc/misc.c
@@ -64,7 +64,10 @@
/* Used only for assertions, and to prevent */
/* recursive reentry in the system call wrapper. */
# endif
-# else
+# elif defined(SN_TARGET_PS3)
+ #include <pthread.h>
+ pthread_mutex_t GC_allocate_ml;
+# else
--> declare allocator lock here
# endif
# endif
@@ -481,6 +484,10 @@ GC_bool GC_is_initialized = FALSE;
void GC_init()
{
+#if defined(SN_TARGET_PS3)
+ pthread_mutexattr_t mattr;
+#endif
+
DCL_LOCK_STATE;
DISABLE_SIGNALS();
@@ -498,6 +505,13 @@ void GC_init()
InitializeCriticalSection (&GC_allocate_ml);
}
#endif /* MSWIN32 */
+#if defined(SN_TARGET_PS3)
+ pthread_mutexattr_init (&mattr);
+
+ pthread_mutex_init (&GC_allocate_ml, &mattr);
+ pthread_mutexattr_destroy (&mattr);
+
+#endif
LOCK();
GC_init_inner();