From 602f69718b9dd2c5cc89128252dd230b21576788 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?= <grubba@grubba.org> Date: Sat, 25 Oct 1997 20:05:58 +0200 Subject: [PATCH] Minor change to REVEAL_GLOBAL_VARIABLES() macro. Rev: src/threads.h:1.21 --- src/threads.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/threads.h b/src/threads.h index 93251ba664..d89c7cd2a6 100644 --- a/src/threads.h +++ b/src/threads.h @@ -230,22 +230,25 @@ struct thread_state { int low_make_buf_space = 0, pop_n_elems = 0; \ int push_sp_mark = 0, pop_sp_mark = 0 -#define REVEAL_GLOBAL_VARIABLES() } while(0) +/* Note that the semi-colon below is needed to add an empty statement + * in case there is a label before the macro. + */ +#define REVEAL_GLOBAL_VARIABLES() ; } while(0) #else /* DEBUG */ #define HIDE_GLOBAL_VARIABLES() #define REVEAL_GLOBAL_VARIABLES() #endif /* DEBUG */ -#define THREADS_ALLOW() \ - do {\ +#define THREADS_ALLOW() do { \ struct thread_state *_tmp=(struct thread_state *)thread_id->storage; \ if(num_threads > 1 && !threads_disabled) { \ SWAP_OUT_THREAD(_tmp); \ THREADS_FPRINTF((stderr, "THREADS_ALLOW() %s:%d t:%08x\n", \ __FILE__, __LINE__, (unsigned int)_tmp->thread_id)); \ mt_unlock(& interpreter_lock); \ - } else {} HIDE_GLOBAL_VARIABLES() + } else {} \ + HIDE_GLOBAL_VARIABLES() #define THREADS_DISALLOW() \ REVEAL_GLOBAL_VARIABLES(); \ -- GitLab