mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-11 06:20:23 +02:00
* __scm.h: Fix a bunch of macros that were missing do-while(0)
sandwiches. * debug.c, eval.c: Fix buggy uses of SCM_ALLOW_INTS (missing semicolon) exposed by the above change.
This commit is contained in:
parent
155265386a
commit
bfc69694be
3 changed files with 16 additions and 16 deletions
|
@ -254,10 +254,10 @@ typedef long SCM_STACKITEM;
|
|||
extern unsigned int scm_async_clock;
|
||||
|
||||
#define SCM_ASYNC_TICK \
|
||||
{ \
|
||||
do { \
|
||||
if (0 == --scm_async_clock) \
|
||||
scm_async_click (); \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
#ifdef SCM_CAREFUL_INTS
|
||||
#define SCM_CHECK_NOT_DISABLED \
|
||||
|
@ -296,25 +296,25 @@ extern unsigned int scm_async_clock;
|
|||
#endif
|
||||
|
||||
#define SCM_DEFER_INTS \
|
||||
{ \
|
||||
do { \
|
||||
SCM_FENCE; \
|
||||
SCM_CHECK_NOT_DISABLED; \
|
||||
SCM_THREAD_DEFER; \
|
||||
SCM_FENCE; \
|
||||
scm_ints_disabled = 1; \
|
||||
SCM_FENCE; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
|
||||
#define SCM_ALLOW_INTS_ONLY \
|
||||
{ \
|
||||
do { \
|
||||
SCM_THREAD_ALLOW; \
|
||||
scm_ints_disabled = 0; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
|
||||
#define SCM_ALLOW_INTS \
|
||||
{ \
|
||||
do { \
|
||||
SCM_FENCE; \
|
||||
SCM_CHECK_NOT_ENABLED; \
|
||||
SCM_THREAD_SWITCHING_CODE; \
|
||||
|
@ -324,20 +324,20 @@ extern unsigned int scm_async_clock;
|
|||
SCM_THREAD_ALLOW; \
|
||||
SCM_ASYNC_TICK; \
|
||||
SCM_FENCE; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
|
||||
#define SCM_REDEFER_INTS \
|
||||
{ \
|
||||
do { \
|
||||
SCM_FENCE; \
|
||||
SCM_THREAD_REDEFER; \
|
||||
++scm_ints_disabled; \
|
||||
SCM_FENCE; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
|
||||
#define SCM_REALLOW_INTS \
|
||||
{ \
|
||||
do { \
|
||||
SCM_FENCE; \
|
||||
SCM_THREAD_REALLOW_1; \
|
||||
SCM_THREAD_SWITCHING_CODE; \
|
||||
|
@ -349,14 +349,14 @@ extern unsigned int scm_async_clock;
|
|||
SCM_ASYNC_TICK; \
|
||||
} \
|
||||
SCM_FENCE; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
|
||||
#define SCM_TICK \
|
||||
{ \
|
||||
do { \
|
||||
SCM_DEFER_INTS; \
|
||||
SCM_ALLOW_INTS; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ scm_debug_options (setting)
|
|||
SCM_RESET_DEBUG_MODE;
|
||||
scm_stack_checking_enabled_p = SCM_STACK_CHECKING_P;
|
||||
scm_debug_eframe_size = 2 * SCM_N_FRAMES;
|
||||
SCM_ALLOW_INTS
|
||||
SCM_ALLOW_INTS;
|
||||
return ans;
|
||||
}
|
||||
|
||||
|
|
|
@ -1796,7 +1796,7 @@ scm_evaluator_traps (setting)
|
|||
SCM_N_EVALUATOR_TRAPS,
|
||||
s_evaluator_traps);
|
||||
SCM_RESET_DEBUG_MODE;
|
||||
SCM_ALLOW_INTS
|
||||
SCM_ALLOW_INTS;
|
||||
return ans;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue