少年修仙传客户端基础资源
hch
2024-04-01 d01413b00ef631ac20347716b23818b0b811f65f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/**
 * \file
 * 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__
 
#include <config.h>
#include <stdlib.h>
 
#ifdef HAVE_BOEHM_GC
#ifdef HAVE_BDWGC_GC
/* Use unity's updated Boehm GC from IL2CPP */
#define ALL_INTERIOR_POINTERS 1
#define GC_GCJ_SUPPORT 1
#define JAVA_FINALIZATION 1
#define NO_EXECUTE_PERMISSION 1
#define GC_NO_THREADS_DISCOVERY 1
#define IGNORE_DYNAMIC_LOADING 1
#define GC_DONT_REGISTER_MAIN_STATIC_DATA 1
#define GC_VERSION_MAJOR 7
#define GC_VERSION_MINOR 7
#define GC_VERSION_MICRO 0
#define GC_THREADS 1
#define USE_MMAP 1
#define USE_MUNMAP 1
 
#define GC_EventType GCEventType
 
#    include <gc.h>
#    include <gc_typed.h>
#    include <gc_gcj.h>
#else /* HAVE_BDWGC_GC */
/*Use Mono's Boehm */
#    ifdef _MSC_VER
#        include <winsock2.h>
#    else
        /* libgc specifies this on the command line,
         * so we must define it ourselfs
        */
#        define GC_GCJ_SUPPORT
#    endif
 
    /*
     * Local allocation is only beneficial if we have __thread
     * We had to fix a bug with include order in libgc, so only do
     * it if it is the included one.
     */
    
#    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.ac */
        /* 
         * ARM has no definition for some atomic functions in gc_locks.h and
         * support is also disabled in libgc/configure.ac.
         */
#       if !defined(__sparc__) && !defined(__sun) && !defined(__arm__) && !defined(__mips__)
#            define GC_REDIRECT_TO_LOCAL
#       endif
#    endif
 
#    define GC_INSIDE_DLL
#    include <gc.h>
#    include <gc_typed.h>
#    include <gc_mark.h>
#    include <gc_gcj.h>
 
#if defined(HOST_WIN32)
#define CreateThread GC_CreateThread
#endif
#endif /* HAVE_BDWGC_GC */
 
#elif defined(HAVE_SGEN_GC)
 
#else /* not Boehm and not sgen GC */
#endif
 
#endif