203 |
SCM_SNARF_HERE(SCM c_name) \ |
SCM_SNARF_HERE(SCM c_name) \ |
204 |
SCM_SNARF_INIT(c_name = scm_permanent_object (scm_c_define (scheme_name, init_val));) |
SCM_SNARF_INIT(c_name = scm_permanent_object (scm_c_define (scheme_name, init_val));) |
205 |
|
|
206 |
|
#define SCM_NONREC_CRITICAL_SECTION(prefix) \ |
207 |
|
SCM_SNARF_HERE(static scm_t_mutex prefix ## _mutex) \ |
208 |
|
SCM_SNARF_INIT(scm_i_plugin_mutex_init (&prefix ## _mutex, 0)) |
209 |
|
|
210 |
|
#define SCM_GLOBAL_NONREC_CRITICAL_SECTION(prefix) \ |
211 |
|
SCM_SNARF_HERE(scm_t_mutex prefix ## _mutex) \ |
212 |
|
SCM_SNARF_INIT(scm_i_plugin_mutex_init (&prefix ## _mutex, 0)) |
213 |
|
|
214 |
|
#define SCM_REC_CRITICAL_SECTION(prefix) \ |
215 |
|
SCM_SNARF_HERE(\ |
216 |
|
static scm_t_mutex prefix ## _mutex; \ |
217 |
|
static int prefix ## _count; \ |
218 |
|
static scm_thread *prefix ## _owner\ |
219 |
|
)SCM_SNARF_INIT(\ |
220 |
|
scm_i_plugin_mutex_init (&prefix ## _mutex, 0)\ |
221 |
|
) |
222 |
|
|
223 |
|
#define SCM_GLOBAL_REC_CRITICAL_SECTION(prefix) \ |
224 |
|
SCM_SNARF_HERE(\ |
225 |
|
scm_t_mutex prefix ## _mutex; \ |
226 |
|
int prefix ## _count; \ |
227 |
|
scm_thread *prefix ## _owner\ |
228 |
|
)SCM_SNARF_INIT(\ |
229 |
|
scm_i_plugin_mutex_init (&prefix ## _mutex, 0); \ |
230 |
|
prefix ## _count = 0; \ |
231 |
|
prefix ## _owner = 0\ |
232 |
|
) |
233 |
|
|
234 |
#ifdef SCM_MAGIC_SNARF_DOCS |
#ifdef SCM_MAGIC_SNARF_DOCS |
235 |
#undef SCM_ASSERT |
#undef SCM_ASSERT |
236 |
#define SCM_ASSERT(_cond, _arg, _pos, _subr) ^^ argpos _arg _pos __LINE__ ^^ |
#define SCM_ASSERT(_cond, _arg, _pos, _subr) ^^ argpos _arg _pos __LINE__ ^^ |