X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Futils%2Fgc_wrapper.h;h=908bcabc5125d0e594237ac67286015302cd8ff9;hb=ef0ddf45c3081e799edcb4e95770186514b80cf1;hp=801300867f1b2f2e09642aba31efc181ece3873f;hpb=6f2b5cd69f33daad2303e46311e7333239dadfdc;p=mono.git diff --git a/mono/utils/gc_wrapper.h b/mono/utils/gc_wrapper.h index 801300867f1..908bcabc512 100644 --- a/mono/utils/gc_wrapper.h +++ b/mono/utils/gc_wrapper.h @@ -1,3 +1,8 @@ +/* + * Copyright 2004-2011 Novell, Inc (http://www.novell.com) + * Copyright 2011 Xamarin, Inc (http://www.xamarin.com) + * Licensed under the MIT license. See LICENSE file in the project root for full license information. + */ #ifndef __MONO_OS_GC_WRAPPER_H__ #define __MONO_OS_GC_WRAPPER_H__ @@ -21,55 +26,30 @@ * it if it is the included one. */ -# if defined(HAVE_KW_THREAD) && defined(USE_INCLUDED_LIBGC) && !defined(__powerpc__) +# if defined(HAVE_KW_THREAD) && !defined(__powerpc__) /* The local alloc stuff is in pthread_support.c, but solaris uses solaris_threads.c */ - /* It is also disabled on solaris/x86 by libgc/configure.in */ + /* It is also disabled on solaris/x86 by libgc/configure.ac */ /* * ARM has no definition for some atomic functions in gc_locks.h and - * support is also disabled in libgc/configure.in. + * support is also disabled in libgc/configure.ac. */ -# if !defined(__sparc__) && !defined(__sun) && !defined(__arm__) +# if !defined(__sparc__) && !defined(__sun) && !defined(__arm__) && !defined(__mips__) # define GC_REDIRECT_TO_LOCAL # endif # endif -# ifdef HAVE_GC_GC_H -# include -# include -# include -# include -# elif defined(HAVE_GC_H) || defined(USE_INCLUDED_LIBGC) -# include -# include -# include -# include -# else -# error have boehm GC without headers, you probably need to install them by hand -# endif +# define GC_INSIDE_DLL +# include +# include +# include +# include -#if defined(PLATFORM_WIN32) +#if defined(HOST_WIN32) #define CreateThread GC_CreateThread #endif #elif defined(HAVE_SGEN_GC) -#if defined(PLATFORM_WIN32) -#define CreateThread mono_gc_CreateThread -#else -/* pthread function wrappers */ -#include -#include - -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); - -#define pthread_create mono_gc_pthread_create -#define pthread_join mono_gc_pthread_join -#define pthread_detach mono_gc_pthread_detach - -#endif - #else /* not Boehm and not sgen GC */ #endif