2014-05-12
2014-05-12 16:42:44 by Henrik Grubbström (Grubba) <grubba@grubba.org>
-
1a57432b66cae373a807e8d62e355c972bb0f5e0
(9 lines)
(+7/-2)
[
Show
| Annotate
]
Branch: 8.0
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();
}