/* 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
return ((size_t) WORDS_TO_BYTES(GC_words_allocd+GC_words_allocd_before_gc));
}
+int GC_get_suspend_signal GC_PROTO(())
+{
+#if defined(SIG_SUSPEND) && defined(GC_PTHREADS) && !defined(GC_MACOSX_THREADS)
+ return SIG_SUSPEND;
+#else
+ return -1;
+#endif
+}
+
GC_bool GC_is_initialized = FALSE;
void GC_init()
{
+#if defined(SN_TARGET_PS3)
+ pthread_mutexattr_t mattr;
+#endif
+
DCL_LOCK_STATE;
DISABLE_SIGNALS();
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();