638
edits
(→Synchronization/concurrency: first cut :-P) |
|||
| Line 201: | Line 201: | ||
#define '''GC_FAST_RESUME_REQUEST'''(heap) ... | #define '''GC_FAST_RESUME_REQUEST'''(heap) ... | ||
These are macros such that | These are macros such that this code: | ||
<pre style="border: none; padding: none; background-color: transparent">GC_FAST_SUSPEND_REQUEST(expr); | |||
<statements> | |||
GC_FAST_RESUME_REQUEST(expr);</pre> | |||
expands to a C/C++ statement that behaves like this one: | |||
<pre style="border: none; padding: none; background-color: transparent">{ | |||
gc_suspend_request(heap); | |||
<statements> | |||
gc_resume_request(heap); | |||
}</pre> | |||
except that: | |||
* in C++, <code>gc_resume_request</code> must called even if an exception is thrown; and | * in C++, <code>gc_resume_request</code> must called even if an exception is thrown; and | ||
* the behavior is undefined if the statements contain any identifier starting with <code>_gc_</code>. | * the behavior is undefined if the ''<statements>'' contain any identifier starting with <code>_gc_</code>. | ||
If either macro is used any other way, the result is undefined. | |||
void '''gc_yield_request'''(GCHeap heap); | void '''gc_yield_request'''(GCHeap heap); | ||
edits