thrID ExecutionTracker::schedule(SchedPointInfo * s) { void * ret_addr = s->ret_addr; string type = s->type; thrID myself = s->thread; map<thrID, bool> en_map = s->enabled; thrID nextchoice = log->getNextScheduleChoice(s); if (nextchoice == INVALID_THREAD) { s->fromLog = false; nextchoice = this->pickNextSchedulingChoice(s); if (nextchoice == INVALID_THREAD) { deadlockCheck(); bool notThrilleInternalError = false; safe_assert(notThrilleInternalError); } recordScheduleInfo(myself, nextchoice, type, ret_addr); } else { followingChoiceFromLog(s); s->fromLog = true; char buffer[MAX_READ_SIZE]; sprintf(buffer, "%p", ret_addr); string tmp(buffer); if (ret_addr < (void*) 0x999999) { compareScheduleSynchronization(tmp, log->getLastID()); } else { // heuristically skipping addr comparison // because statement id looks like it lives in a dynamic library skipped_comparisons++; } recordScheduleInfo(myself, nextchoice, type, ret_addr); } s->enabled = enable_map; launchThread(nextchoice, s); return nextchoice; }
bool ThreadWithProgressWindow::runThread (const int priority) { launchThread (priority); while (isTimerRunning()) MessageManager::getInstance()->runDispatchLoopUntil (5); return ! wasCancelledByUser; }
//============================================================================== void Thread::startThread() { std::lock_guard<std::recursive_mutex> sl (startStopLock); shouldExit = false; if (threadHandle == nullptr) { launchThread(); startSuspensionEvent.signal(); } }
//============================================================================== void Thread::startThread() { const RecursiveMutex::ScopedLockType sl (startStopLock); shouldExit = false; if (threadHandle == nullptr) { launchThread(); setThreadPriority (threadHandle, threadPriority); startSuspensionEvent.signal(); } }
CoreBoundTaskQueue::CoreBoundTaskQueue(int core): AbstractCoreBoundTaskQueue(), _blocked(false) { _core = core; launchThread(_core); }
void CoreBoundPriorityQueue::init(){ launchThread(_core); }
WSCoreBoundTaskQueue::WSCoreBoundTaskQueue(int core, WSSimpleTaskScheduler<WSCoreBoundTaskQueue> *scheduler): AbstractCoreBoundTaskQueue() { _core = core; _scheduler = scheduler; launchThread(_core); }
ThreadLauncher::ThreadLauncher(Client* client) : m_client(client) { launchThread(); }
void CoreBoundQueue::init(){ launchThread(_core); }