comparison src/gc/orchestrate.h @ 0:2cf249471370

convert mercurial for git
author Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Tue, 08 May 2018 16:09:12 +0900
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:2cf249471370
1 void MVM_gc_enter_from_allocator(MVMThreadContext *tc);
2 void MVM_gc_enter_from_interrupt(MVMThreadContext *tc);
3 MVM_PUBLIC void MVM_gc_mark_thread_blocked(MVMThreadContext *tc);
4 MVM_PUBLIC void MVM_gc_mark_thread_unblocked(MVMThreadContext *tc);
5 MVM_PUBLIC MVMint32 MVM_gc_is_thread_blocked(MVMThreadContext *tc);
6 void MVM_gc_global_destruction(MVMThreadContext *tc);
7
8 struct MVMWorkThread {
9 MVMThreadContext *tc;
10 void *limit;
11 };
12
13 typedef enum {
14 MVM_GC_DEBUG_ORCHESTRATE = 1,
15 MVM_GC_DEBUG_COLLECT = 2,
16 /* MVM_GC_DEBUG_ = 4,
17 MVM_GC_DEBUG_ = 8,
18 MVM_GC_DEBUG_ = 16,
19 MVM_GC_DEBUG_ = 32,
20 MVM_GC_DEBUG_ = 64,
21 MVM_GC_DEBUG_ = 128,
22 MVM_GC_DEBUG_ = 256,
23 MVM_GC_DEBUG_ = 512,
24 MVM_GC_DEBUG_ = 1024,
25 MVM_GC_DEBUG_ = 2048,
26 MVM_GC_DEBUG_ = 4096,
27 MVM_GC_DEBUG_ = 8192,
28 MVM_GC_DEBUG_ = 16384,
29 MVM_GC_DEBUG_ = 32768,
30 MVM_GC_DEBUG_ = 65536,
31 MVM_GC_DEBUG_ = 131072,
32 MVM_GC_DEBUG_ = 262144,
33 MVM_GC_DEBUG_ = 524288,
34 MVM_GC_DEBUG_ = 1048576,
35 MVM_GC_DEBUG_ = 2097152,
36 MVM_GC_DEBUG_ = 4194304,
37 MVM_GC_DEBUG_ = 8388608,
38 MVM_GC_DEBUG_ = 16777216,
39 MVM_GC_DEBUG_ = 33554432,
40 MVM_GC_DEBUG_ = 67108864,
41 MVM_GC_DEBUG_ = 134217728*/
42 } MVMGCDebugLogFlags;
43
44 /* OR together the flags you want to require, or redefine
45 * MVM_GC_DEBUG_ENABLED(flags) if you want something more
46 * complicated. */
47 #define MVM_GC_DEBUG_LOG_FLAGS \
48 0
49
50 #define MVM_GC_DEBUG_ENABLED(flags) \
51 ((MVM_GC_DEBUG_LOG_FLAGS) & (flags))
52
53 #ifdef _MSC_VER
54 # define GCDEBUG_LOG(tc, flags, msg, ...) \
55 if (MVM_GC_DEBUG_ENABLED(flags)) \
56 printf((msg), (tc)->thread_id, \
57 MVM_load(&(tc)->instance->gc_seq_number), __VA_ARGS__)
58 #else
59 # define GCDEBUG_LOG(tc, flags, msg, ...) \
60 if (MVM_GC_DEBUG_ENABLED(flags)) \
61 printf((msg), (tc)->thread_id, \
62 (int)MVM_load(&(tc)->instance->gc_seq_number) , ##__VA_ARGS__)
63 #endif