Skip to content
Snippets Groups Projects
Commit 602f6971 authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Minor change to REVEAL_GLOBAL_VARIABLES() macro.

Rev: src/threads.h:1.21
parent 765e7eb5
No related branches found
No related tags found
No related merge requests found
...@@ -230,22 +230,25 @@ struct thread_state { ...@@ -230,22 +230,25 @@ struct thread_state {
int low_make_buf_space = 0, pop_n_elems = 0; \ int low_make_buf_space = 0, pop_n_elems = 0; \
int push_sp_mark = 0, pop_sp_mark = 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 */ #else /* DEBUG */
#define HIDE_GLOBAL_VARIABLES() #define HIDE_GLOBAL_VARIABLES()
#define REVEAL_GLOBAL_VARIABLES() #define REVEAL_GLOBAL_VARIABLES()
#endif /* DEBUG */ #endif /* DEBUG */
#define THREADS_ALLOW() \ #define THREADS_ALLOW() do { \
do {\
struct thread_state *_tmp=(struct thread_state *)thread_id->storage; \ struct thread_state *_tmp=(struct thread_state *)thread_id->storage; \
if(num_threads > 1 && !threads_disabled) { \ if(num_threads > 1 && !threads_disabled) { \
SWAP_OUT_THREAD(_tmp); \ SWAP_OUT_THREAD(_tmp); \
THREADS_FPRINTF((stderr, "THREADS_ALLOW() %s:%d t:%08x\n", \ THREADS_FPRINTF((stderr, "THREADS_ALLOW() %s:%d t:%08x\n", \
__FILE__, __LINE__, (unsigned int)_tmp->thread_id)); \ __FILE__, __LINE__, (unsigned int)_tmp->thread_id)); \
mt_unlock(& interpreter_lock); \ mt_unlock(& interpreter_lock); \
} else {} HIDE_GLOBAL_VARIABLES() } else {} \
HIDE_GLOBAL_VARIABLES()
#define THREADS_DISALLOW() \ #define THREADS_DISALLOW() \
REVEAL_GLOBAL_VARIABLES(); \ REVEAL_GLOBAL_VARIABLES(); \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment