2014-12-04
2014-12-04 19:26:17 by Henrik Grubbström (Grubba) <grubba@grubba.org>
-
13a209267c01f011c9d5830e1784a91dd0c68285
(9 lines)
(+7/-2)
[
Show
| Annotate
]
Branch: bill/master_archive_support
Compiler: Fixed thread context conflict.
co_wait_interpreter() doesn't swap out and in the active thread...
Fixes [LysLysKOM 20811527] (and probably [LysLysKOM 20811537] as well).
54: Inside #if defined(PIKE_THREADS)
PMOD_EXPORT void lock_pike_compiler(void)
{
+ if (lock_depth && (Pike_compiler_thread != th_self())) {
+ SWAP_OUT_CURRENT_THREAD();
while (lock_depth && (Pike_compiler_thread != th_self())) {
co_wait_interpreter(&Pike_compiler_cond);
}
-
+ SWAP_IN_CURRENT_THREAD();
+ }
lock_depth++;
Pike_compiler_thread = th_self();
}