2 * Copyright 2004-2011 Novell, Inc (http://www.novell.com)
3 * Copyright 2011 Xamarin, Inc (http://www.xamarin.com)
5 #ifndef __MONO_OS_GC_WRAPPER_H__
6 #define __MONO_OS_GC_WRAPPER_H__
14 # include <winsock2.h>
16 /* libgc specifies this on the command line,
17 * so we must define it ourselfs
19 # define GC_GCJ_SUPPORT
23 * Local allocation is only beneficial if we have __thread
24 * We had to fix a bug with include order in libgc, so only do
25 * it if it is the included one.
28 # if defined(HAVE_KW_THREAD) && !defined(__powerpc__)
29 /* The local alloc stuff is in pthread_support.c, but solaris uses solaris_threads.c */
30 /* It is also disabled on solaris/x86 by libgc/configure.ac */
32 * ARM has no definition for some atomic functions in gc_locks.h and
33 * support is also disabled in libgc/configure.ac.
35 # if !defined(__sparc__) && !defined(__sun) && !defined(__arm__) && !defined(__mips__)
36 # define GC_REDIRECT_TO_LOCAL
40 # define GC_INSIDE_DLL
42 # include <gc_typed.h>
46 #if defined(HOST_WIN32)
47 #define CreateThread GC_CreateThread
50 #elif defined(HAVE_SGEN_GC)
52 #else /* not Boehm and not sgen GC */