Branch: Tag:

2014-12-04

2014-12-04 19:26:17 by Henrik Grubbström (Grubba) <grubba@grubba.org>

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();   }