Branch: Tag:


2014-12-04 19:23:12 by Henrik Grubbström (Grubba) <>

Threads: Fixed hang in co_wait_interpreter().

co_wait_interpreter() would hang (waiting for threads to be
reenabled) if called in a disabled_thread context. This happens
on OSes using USE_WAIT_THREAD (eg Solaris) if a process is waited
on in a disabled_thread context.

524:      PMOD_EXPORT INLINE void pike_wait_interpreter (COND_T *cond COMMA_DLOC_DECL)   { +  int owner = threads_disabled;    pike_low_wait_interpreter (cond COMMA_DLOC_ARGS_OPT); -  if (threads_disabled) threads_disabled_wait (DLOC_ARGS_OPT); +  if (!owner && threads_disabled) threads_disabled_wait (DLOC_ARGS_OPT);   }      PMOD_EXPORT INLINE int pike_timedwait_interpreter (COND_T *cond,