void restart() { mutex_.init(); condition_.init(); pause_condition_.init(); state = cUnknown; stop_ = false; pause_ = false; paused_ = false; run(); }
BackgroundCompilerThread(LLVMState* ls) : Thread(0, false) , ls_(ls) , current_compiler_(0) , current_req_(0) , state(cUnknown) , stop_(false) , pause_(false) , paused_(false) { show_machine_code_ = ls->jit_dump_code() & cMachineCode; condition_.init(); pause_condition_.init(); }
WorldState() : pending_threads_(0) , should_stop_(0) , time_waiting_(0) { mutex_.init(); waiting_to_run_.init(); }
WorldState(bool* check_global_interrupts) : pending_threads_(0) , should_stop_(0) , check_global_interrupts_(check_global_interrupts) , time_waiting_(0) { mutex_.init(); waiting_to_run_.init(); }
/** * Called after a fork(), when we know we're alone again, to get * everything back in the proper order. */ void reinit() { // When we're reinitting the world state, we're stopped // so we have to initialize pending_threads_ to 0 and // should_stop to 1 so we start off in the proper state // and can continue after a fork. pending_threads_ = 0; should_stop_ = 1; mutex_.init(); waiting_to_run_.init(); }