pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:47:   #undef ATTRIBUTE   #define ATTRIBUTE(X)      #ifdef PIKE_THREADS   static COND_T Pike_compiler_cond;   static THREAD_T Pike_compiler_thread;   static int lock_depth = 0;      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();   }      PMOD_EXPORT void unlock_pike_compiler(void)   {   #ifdef PIKE_DEBUG    if (lock_depth < 1) {    Pike_fatal("Pike compiler running unlocked!\n");    }