-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmono.config
85 lines (71 loc) · 3.17 KB
/
mono.config
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
81
82
83
84
85
////////////////////////////////////////////////////////////////////////////////
// SGen
////////////////////////////////////////////////////////////////////////////////
sgen_lock_gc "take the GC lock"
-> !sgen_gc_locked "can't take the GC lock when it's already held";
sgen_gc_locked "assume the GC is locked";
sgen_stop_world "stop the world"
-> sgen_gc_locked "can only stop the world when the GC is locked"
-> !sgen_world_stopped "can't stop the world when it's already stopped";
sgen_world_stopped "assume the world is stopped";
////////////////////////////////////////////////////////////////////////////////
// Signal safety
////////////////////////////////////////////////////////////////////////////////
// malloc implicit "allocate malloc memory";
signal_unsafe implicit "use async signal-unsafe functions";
////////////////////////////////////////////////////////////////////////////////
// Locking
////////////////////////////////////////////////////////////////////////////////
// lock_loader "take the loader lock"
// -> !(domain_locked(?) | domain_jit_locked(?) | sgen_gc_locked)
// "can't take the loader lock when a lower-level lock is already held";
//
// loader_locked
// "assume the loader is locked";
//
// lock_domain(d) "lock a domain"
// -> !domain_locked(d) "can't lock a domain when its lock is already held";
//
// domain_locked(d) "assume a domain is locked";
//
// lock_domain_jit(d)
// -> !domain_jit_locked(d) "can't lock a domain JIT when its lock is already held";
//
// domain_jit_locked(d) "assume a domain is locked";
////////////////////////////////////////////////////////////////////////////////
// Program phases?
////////////////////////////////////////////////////////////////////////////////
// starting_up "assume the runtime is starting up"
// -> !shutting_down "can't run startup functions while shutting down";
//
// shutting_down "assume the runtime is shutting down"
// -> !starting_up "can't run shutdown functions while the runtime is starting up";
////////////////////////////////////////////////////////////////////////////////
// Annotation Enforcement
////////////////////////////////////////////////////////////////////////////////
// Module-level enforcement: the following files are considered "modules":
// annotations are required on all top-level functions declared or defined in
// paths ending with these strings.
.enforce "sgen/gc-internal-agnostic.h";
.enforce "sgen/sgen-array-list.h";
.enforce "sgen/sgen-cardtable.h";
.enforce "sgen/sgen-client.h";
.enforce "sgen/sgen-descriptor.h";
.enforce "sgen/sgen-gc.h";
.enforce "sgen/sgen-gray.h";
.enforce "sgen/sgen-hash-table.h";
.enforce "sgen/sgen-major-copy-object.h";
.enforce "sgen/sgen-marksweep-drain-gray-stack.h";
.enforce "sgen/sgen-memory-governor.h";
.enforce "sgen/sgen-minor-copy-object.h";
.enforce "sgen/sgen-minor-scan-object.h";
.enforce "sgen/sgen-pinning.h";
.enforce "sgen/sgen-pointer-queue.h";
.enforce "sgen/sgen-scan-object.h";
.enforce "sgen/sgen-thread-pool.h";
.enforce "sgen/sgen-workers.h";
// Additional functions to enforce go here, possibly including a path to
// disambiguate static functions.
//
// .enforce mono_foo_bar;
// .enforce "some_path.c" quux;