cb.mono_method_is_critical = (gpointer)mono_runtime_is_critical_method;
#ifndef HOST_WIN32
cb.thread_exit = mono_gc_pthread_exit;
- cb.mono_gc_pthread_create = (gpointer)mono_gc_pthread_create;
#endif
mono_threads_init (&cb, sizeof (MonoThreadInfo));
#ifndef HOST_WIN32
-int
-mono_gc_pthread_create (pthread_t *new_thread, const pthread_attr_t *attr, void *(*start_routine)(void *), void *arg)
-{
- return pthread_create (new_thread, attr, start_routine, arg);
-}
-
int
mono_gc_pthread_join (pthread_t thread, void **retval)
{
manner that boehm-gc does it. This is probably worth investigating
more carefully. */
cb.mono_method_is_critical = (gpointer)mono_runtime_is_critical_method;
- cb.mono_gc_pthread_create = (gpointer)mono_gc_pthread_create;
cb.thread_exit = mono_gc_pthread_exit;
mono_threads_init (&cb, sizeof (MonoThreadInfo));
#ifndef HOST_WIN32
-int
-mono_gc_pthread_create (pthread_t *new_thread, const pthread_attr_t *attr, void *(*start_routine)(void *), void *arg)
-{
- return pthread_create (new_thread, attr, start_routine, arg);
-}
-
int
mono_gc_pthread_join (pthread_t thread, void **retval)
{
#if USE_PTHREAD_INTERCEPT
-int
-mono_gc_pthread_create (pthread_t *new_thread, const pthread_attr_t *attr, void *(*start_routine)(void *), void *arg)
-{
- return pthread_create (new_thread, attr, start_routine, arg);
-}
-
int
mono_gc_pthread_join (pthread_t thread, void **retval)
{
cb.mono_thread_in_critical_region = thread_in_critical_region;
#ifndef HOST_WIN32
cb.thread_exit = mono_gc_pthread_exit;
- cb.mono_gc_pthread_create = (gpointer)mono_gc_pthread_create;
#endif
mono_threads_init (&cb, sizeof (SgenThreadInfo));
/* pthread function wrappers */
#include <pthread.h>
-int mono_gc_pthread_create (pthread_t *new_thread, const pthread_attr_t *attr, void *(*start_routine)(void *), void *arg);
int mono_gc_pthread_join (pthread_t thread, void **retval);
int mono_gc_pthread_detach (pthread_t thread);
void mono_gc_pthread_exit (void *retval) G_GNUC_NORETURN;
MONO_SEM_INIT (&(start_info.registered), 0);
/* Actually start the thread */
- res = mono_threads_get_callbacks ()->mono_gc_pthread_create (&thread, &attr, inner_start_thread, &start_info);
+ res = pthread_create (&thread, &attr, inner_start_thread, &start_info);
if (res) {
MONO_SEM_DESTROY (&(start_info.registered));
return NULL;
gboolean (*mono_method_is_critical) (void *method);
gboolean (*mono_thread_in_critical_region) (THREAD_INFO_TYPE *info);
void (*thread_exit)(void *retval);
-#ifndef HOST_WIN32
- int (*mono_gc_pthread_create) (pthread_t *new_thread, const pthread_attr_t *attr, void *(*start_routine)(void *), void *arg);
-#endif
} MonoThreadInfoCallbacks;
typedef struct {