[sdks] Bump Android NDK, build tools and platform tools versions
[mono-project.git] / mono / utils / gc_wrapper.h
blobda17b3eaf7aee96de037577c8496c85722957657
1 /**
2 * \file
3 * Copyright 2004-2011 Novell, Inc (http://www.novell.com)
4 * Copyright 2011 Xamarin, Inc (http://www.xamarin.com)
5 * Licensed under the MIT license. See LICENSE file in the project root for full license information.
6 */
7 #ifndef __MONO_OS_GC_WRAPPER_H__
8 #define __MONO_OS_GC_WRAPPER_H__
10 #include <config.h>
11 #include <stdlib.h>
13 #ifdef HAVE_BOEHM_GC
15 # ifdef _MSC_VER
16 # include <winsock2.h>
17 # else
18 /* libgc specifies this on the command line,
19 * so we must define it ourselfs
21 # define GC_GCJ_SUPPORT
22 # endif
25 * Local allocation is only beneficial if we have __thread
26 * We had to fix a bug with include order in libgc, so only do
27 * it if it is the included one.
29 #ifndef HOST_WIN32 // FIXME?
30 # if defined(MONO_KEYWORD_THREAD) && !defined(__powerpc__)
32 /* The local alloc stuff is in pthread_support.c, but solaris uses solaris_threads.c */
33 /* It is also disabled on solaris/x86 by libgc/configure.ac */
34 /*
35 * ARM has no definition for some atomic functions in gc_locks.h and
36 * support is also disabled in libgc/configure.ac.
38 # if !defined(__sparc__) && !defined(__sun) && !defined(__arm__) && !defined(__mips__)
39 # define GC_REDIRECT_TO_LOCAL
40 # endif
41 # endif
42 #endif // HOST_WIN32
44 # define GC_INSIDE_DLL
45 # include <gc.h>
46 # include <gc_typed.h>
47 # include <gc_mark.h>
48 # include <gc_gcj.h>
50 #if defined(HOST_WIN32)
51 #define CreateThread GC_CreateThread
52 #endif
54 #elif defined(HAVE_SGEN_GC)
56 #else /* not Boehm and not sgen GC */
57 #endif
59 #endif