Skip to content
Snippets Groups Projects
Commit 10e21756 authored by Per Hedbor's avatar Per Hedbor
Browse files

Added debug code (commented out in this version) to follow

THREADS_ALLOW and THREADS_DISALLOW operations.

Rev: src/threads.h:1.13
parent 09dceb3e
No related branches found
No related tags found
No related merge requests found
...@@ -182,13 +182,17 @@ struct thread_state { ...@@ -182,13 +182,17 @@ struct thread_state {
_tmp.evaluator_stack_malloced=evaluator_stack_malloced; \ _tmp.evaluator_stack_malloced=evaluator_stack_malloced; \
_tmp.mark_stack_malloced=mark_stack_malloced; \ _tmp.mark_stack_malloced=mark_stack_malloced; \
_tmp.thread_id = thread_id; \ _tmp.thread_id = thread_id; \
/* fprintf(stderr, "THREADS_ALLOW() %s:%d", __FILE__, __LINE__);*/\
mt_unlock(& interpreter_lock); \ mt_unlock(& interpreter_lock); \
/*th_yield();*/\ /*th_yield();*/\
/* fprintf(stderr, "\n");*/\
} }
#define THREADS_DISALLOW() \ #define THREADS_DISALLOW() \
if(_tmp.swapped) { \ if(_tmp.swapped) { \
/* fprintf(stderr, "THREADS_DISALLOW() %s:%d ... ", __FILE__, __LINE__);*/\
mt_lock(& interpreter_lock); \ mt_lock(& interpreter_lock); \
/* fprintf(stderr, "\n");*/\
sp=_tmp.sp; \ sp=_tmp.sp; \
evaluator_stack=_tmp.evaluator_stack; \ evaluator_stack=_tmp.evaluator_stack; \
mark_sp=_tmp.mark_sp; \ mark_sp=_tmp.mark_sp; \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment