Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pike
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pikelang
pike
Commits
602f6971
Commit
602f6971
authored
27 years ago
by
Henrik (Grubba) Grubbström
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/threads.h
+7
-4
7 additions, 4 deletions
src/threads.h
with
7 additions
and
4 deletions
src/threads.h
+
7
−
4
View file @
602f6971
...
@@ -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(); \
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment