这篇教程C++ GetThread函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中GetThread函数的典型用法代码示例。如果您正苦于以下问题:C++ GetThread函数的具体用法?C++ GetThread怎么用?C++ GetThread使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了GetThread函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: GetThread/*================idThread::Event_WaitForThread================*/void idThread::Event_WaitForThread( int num ) { idThread *thread; thread = GetThread( num ); if ( !thread ) { if ( g_debugScript.GetBool() ) { // just print a warning and continue executing Warning( "Thread %d not running", num ); } } else { Pause(); waitingForThread = thread; }}
开发者ID:Salamek,项目名称:Shadow-of-Dust,代码行数:19,
示例2: CRemotingServices__CheckForContextMatch//+----------------------------------------------------------------------------//// Method: CRemotingServices::CheckForContextMatch public//// Synopsis: This code generates a check to see if the current context and// the context of the proxy match.// //+----------------------------------------------------------------------------//// returns zero if contexts match// returns non-zero if contexts don't match//extern "C" UINT_PTR __stdcall CRemotingServices__CheckForContextMatch(Object* pStubData){ // This method cannot have a contract because CreateStubForNonVirtualMethod assumes // it won't trash XMM registers. The code generated for contracts by recent compilers // is trashing XMM registers. STATIC_CONTRACT_NOTHROW; STATIC_CONTRACT_GC_NOTRIGGER; STATIC_CONTRACT_MODE_COOPERATIVE; // due to the Object parameter STATIC_CONTRACT_SO_TOLERANT; UINT_PTR contextID = *(UINT_PTR*)pStubData->UnBox(); UINT_PTR contextCur = (UINT_PTR)GetThread()->m_Context; return (contextCur != contextID); // chosen to match x86 convention}
开发者ID:0-wiz-0,项目名称:coreclr,代码行数:26,
示例3: GetThreadbool LcdComBase::IsRunning(){ wxThread *t = GetThread(); if( t ){ if( t->IsRunning() ){ return true; } else { return false; } } return false;}
开发者ID:BackupTheBerlios,项目名称:wxsmps-svn,代码行数:14,
示例4: recursion_guardvoid dlgMain::OnRefreshAll(wxCommandEvent &event){ // prevent reentrancy static wxRecursionGuardFlag s_rgf; wxRecursionGuard recursion_guard(s_rgf); if (recursion_guard.IsInside()) return; if (GetThread() && GetThread()->IsRunning()) return; if (!MServer->GetServerCount()) return; m_LstCtrlServers->DeleteAllItems(); m_LstCtrlPlayers->DeleteAllItems(); QueriedServers = 0; TotalPlayers = 0; mtcs_Request.Signal = mtcs_getservers; mtcs_Request.ServerListIndex = -1; mtcs_Request.Index = -1; // Create monitor thread and run it if (this->wxThreadHelper::Create() != wxTHREAD_NO_ERROR) { wxMessageBox(_T("Could not create monitor thread!"), _T("Error"), wxOK | wxICON_ERROR); wxExit(); } GetThread()->Run(); }
开发者ID:JohnnyonFlame,项目名称:odamex,代码行数:37,
示例5: Flashvoid wxGISMapView::StartFlashing(wxGISEnumFlashStyle eFlashStyle){ m_eFlashStyle = eFlashStyle; Flash(eFlashStyle); Refresh(); //wait drawings end to flash if (GetThread() && GetThread()->IsRunning()) { GetThread()->Wait(); } int nMilliSec = DEFAULT_FLASH_PERIOD; switch(eFlashStyle) { case enumGISMapFlashWaves: nMilliSec /= 2; { wxGISAppConfig oConfig = GetConfig(); if(oConfig.IsOk()) nMilliSec = oConfig.ReadInt(enumGISHKCU, wxString(wxT("wxGISCommon/map/flash_waves_time")), nMilliSec); } break; default: case enumGISMapFlashNewColor: { wxGISAppConfig oConfig = GetConfig(); if(oConfig.IsOk()) nMilliSec = oConfig.ReadInt(enumGISHKCU, wxString(wxT("wxGISCommon/map/flash_newcolor_time")), nMilliSec); } break; }; m_nDrawingState = enumGISMapFlashing; m_timer.Start(nMilliSec);}
开发者ID:Mileslee,项目名称:wxgis,代码行数:37,
示例6: piwaitint piwait(int tid){ Initialize(); TCB_t* waitedThread; //TRY TO GET THREAD TO BE WAITED FOR FROM //THREAD LISTS waitedThread = GetThread(activeThreads, tid); if(!waitedThread){ waitedThread = GetThread(expiredThreads, tid); if(!waitedThread){ waitedThread = GetThread(blockedThreads, tid); if(!waitedThread){ waitedThread = GetThread(mutexBlockedThreads, tid); } } } //IF FOUND THE SPECIFIED TID IN THREAD LISTS if(waitedThread){ //THE SPECIFIED TID CAN'T BE WAITED FOR //ANOTHER THREAD if(!GetWait(waitTids, tid)){ waitTids = AddWait(waitTids, tid, runningThread->tid); runningThread->state = BLOCKED; swapcontext(&runningThread->context, schedulerCtx); return 0; } } return -1;}
开发者ID:khinbaptista,项目名称:pithread,代码行数:37,
示例7: GetThread/*================idThread::ObjectMoveDone================*/void idThread::ObjectMoveDone( int threadnum, idEntity *obj ){ idThread *thread; if ( !threadnum ) { return; } thread = GetThread( threadnum ); if ( thread ) { thread->ObjectMoveDone( obj ); }}
开发者ID:revelator,项目名称:Revelator-Doom3,代码行数:20,
示例8: whilewxThread::ExitCode Timer::Entry(){ // here we do our long task, periodically calling TestDestroy(): while (_running && !GetThread()->TestDestroy()) { wxMilliSleep(_ms); if (_running) { wxQueueEvent(_parent->GetEventHandler(), new wxCommandEvent(UpdateEvent)); //new wxTimerEvent()); } } // TestDestroy() returned true (which means the main thread asked us // to terminate as soon as possible) or we ended the long task... return (wxThread::ExitCode)0;}
开发者ID:JochenKempfle,项目名称:MoCap,代码行数:15,
示例9: wxMessageBox// Posts a message from the main thread to the monitor threadbool dlgMain::MainThrPostEvent(mtcs_t CommandSignal, wxInt32 Index, wxInt32 ListIndex){ if (GetThread() && GetThread()->IsRunning()) return false; // Create monitor thread if (this->wxThreadHelper::Create() != wxTHREAD_NO_ERROR) { wxMessageBox(_T("Could not create monitor thread!"), _T("Error"), wxOK | wxICON_ERROR); wxExit(); } mtcs_Request.Signal = CommandSignal; mtcs_Request.Index = Index; mtcs_Request.ServerListIndex = ListIndex; GetThread()->Run(); return true;}
开发者ID:JohnnyonFlame,项目名称:odamex,代码行数:25,
示例10: GetThreadvoid CrstBase::PostEnter(){ if (g_pThreadStore->IsCrstForThreadStore(this)) return; Thread* pThread = GetThread(); if (pThread) { if (!m_heldInSuspension) m_ulReadyForSuspensionCount = pThread->GetReadyForSuspensionCount(); if (!m_enterInCoopGCMode) m_enterInCoopGCMode = pThread->PreemptiveGCDisabled(); }}
开发者ID:ArildF,项目名称:masters,代码行数:15,
示例11: wxLogErrorbool wxGxDiscConnectionUI::CreateAndRunCheckThread(void){ if (CreateThread(wxTHREAD_JOINABLE) != wxTHREAD_NO_ERROR) { wxLogError(_("Could not create the thread!")); return false; } if (GetThread()->Run() != wxTHREAD_NO_ERROR) { wxLogError(_("Could not run the thread!")); return false; } return true;}
开发者ID:GimpoByte,项目名称:nextgismanager,代码行数:15,
示例12: FCIMPL4FCIMPLEND#endif // !FEATURE_CORECLRFCIMPL4(void, AssemblyNameNative::Init, Object * refThisUNSAFE, OBJECTREF * pAssemblyRef, CLR_BOOL fForIntrospection, CLR_BOOL fRaiseResolveEvent){ FCALL_CONTRACT; ASSEMBLYNAMEREF pThis = (ASSEMBLYNAMEREF) (OBJECTREF) refThisUNSAFE; HRESULT hr = S_OK; HELPER_METHOD_FRAME_BEGIN_1(pThis); *pAssemblyRef = NULL; if (pThis == NULL) COMPlusThrow(kNullReferenceException, W("NullReference_This")); Thread * pThread = GetThread(); CheckPointHolder cph(pThread->m_MarshalAlloc.GetCheckpoint()); //hold checkpoint for autorelease AssemblySpec spec; hr = spec.InitializeSpec(&(pThread->m_MarshalAlloc), (ASSEMBLYNAMEREF *) &pThis, TRUE, FALSE); if (SUCCEEDED(hr)) { spec.AssemblyNameInit(&pThis,NULL); } else if ((hr == FUSION_E_INVALID_NAME) && fRaiseResolveEvent) { Assembly * pAssembly = GetAppDomain()->RaiseAssemblyResolveEvent(&spec, fForIntrospection, FALSE); if (pAssembly == NULL) { EEFileLoadException::Throw(&spec, hr); } else { *((OBJECTREF *) (&(*pAssemblyRef))) = pAssembly->GetExposedObject(); } } else { ThrowHR(hr); } HELPER_METHOD_FRAME_END();}
开发者ID:Arpit007,项目名称:coreclr,代码行数:48,
示例13: GetThreadvoid SpinLock::dbg_EnterLock(){ Thread *pThread = GetThread(); if (pThread) { if (!m_heldInSuspension) m_ulReadyForSuspensionCount = pThread->GetReadyForSuspensionCount(); if (!m_enterInCoopGCMode) m_enterInCoopGCMode = (pThread->PreemptiveGCDisabled() == TRUE); } else { _ASSERTE(g_fProcessDetach == TRUE || dbgOnly_IsSpecialEEThread()); }}
开发者ID:ArildF,项目名称:masters,代码行数:16,
示例14: clsLogAutoPtrJEventBody* JThreadManager::MakeEventBody(JCHAR* pThrdName, JCHAR* pModName, JEVT_TYPE eType){ JThread* pThread = JNULL; JEventBody* pEventBody = JNULL; JLogAutoPtr clsLogAutoPtr(JSingleton<JLog>::instance(), JLOG_MOD_THREAD, "JThreadManager::MakeEventBody"); pThread = GetThread(pThrdName); if (pThread) { pEventBody = pThread->MakeEventBody(eType, pModName); } return pEventBody;}
开发者ID:gothame,项目名称:jphone,代码行数:16,
示例15: wxLogErrorbool wxGISProcess::CreateAndRunReadThread(void){ if (CreateThread(wxTHREAD_JOINABLE) != wxTHREAD_NO_ERROR)//wxTHREAD_DETACHED// { wxLogError(_("Could not create the thread!")); return false; } // go! if (GetThread()->Run() != wxTHREAD_NO_ERROR) { wxLogError(_("Could not run the thread!")); return false; } return true;}
开发者ID:Mileslee,项目名称:wxgis,代码行数:16,
示例16: wxLogErrorbool wxGISServerApp::CreateAndRunExitThread(void){ if (CreateThread(wxTHREAD_JOINABLE) != wxTHREAD_NO_ERROR)////wxTHREAD_DETACHED { wxLogError(_("Could not create the exit thread!")); return false; } // go! if (GetThread()->Run() != wxTHREAD_NO_ERROR) { wxLogError(_("Could not run the exit thread!")); return false; } return true;}
开发者ID:GimpoByte,项目名称:nextgismanager,代码行数:16,
示例17: wxLogErrorbool wxGxContentView::CreateAndRunFillMetaThread(void){ if (CreateThread(wxTHREAD_DETACHED) != wxTHREAD_NO_ERROR) { wxLogError(_("Could not create the thread!")); return false; } if (GetThread()->Run() != wxTHREAD_NO_ERROR) { wxLogError(_("Could not run the thread!")); return false; } return true;}
开发者ID:GimpoByte,项目名称:nextgismanager,代码行数:16,
示例18: while/*================idThread::Init================*/void idThread::Init( void ) { // create a unique threadNum do { threadIndex++; if( threadIndex == 0 ) { threadIndex = 1; } } while( GetThread( threadIndex ) ); threadNum = threadIndex; threadList.Append( this ); creationTime = gameLocal.time; lastExecuteTime = 0; manualControl = false; ClearWaitFor(); interpreter.SetThread( this );}
开发者ID:nbohr1more,项目名称:Revelation,代码行数:21,
示例19: GetPackets2void PacketManager :: GetPackets2(void){ if(mQueueData.size() == 0) return;#ifdef DEBUG_TIME Debug::TimeTrack("GetPackets2", 50);#endif GetThread("PacketManager::GetPackets2"); mTransition.assign(mQueueData.begin(), mQueueData.end()); mQueueData.clear(); ReleaseThread(); //Sort the transition list into the outgoing Send list according to socket. //Try to cluster the packets if possible. std::list<PendingSocket>::iterator it; std::list<Packet>::iterator pit; for(it = mTransition.begin(); it != mTransition.end(); ++it) { PendingSocket *pSock = GetSendSocket(it->mSocket); if(pSock != NULL) { for(pit = it->mPacketList.begin(); pit != it->mPacketList.end(); ++pit) { int r = pSock->AddData(*pit); if(r == PendingSocket::DATA_ELEMENT_APPEND) { mClusterPackets++; mClusterPacketBytes += pit->mData.size(); } } } } //All sorted, wipe the transition buffer. mTransition.clear(); /* if(mSendData.size() == 0) mSendData.assign(mQueueData.begin(), mQueueData.end()); else mSendData.insert(mSendData.end(), mQueueData.begin(), mQueueData.end()); mQueueData.clear(); ReleaseThread(); */}
开发者ID:Wuffie12,项目名称:iceee,代码行数:47,
示例20: GetThreadboolThreadInfo::CanInvokeJS() const{#ifdef SPS_STANDALONE return false;#else nsIThread* thread = GetThread(); if (!thread) { MOZ_ASSERT(IsMainThread()); return true; } bool result; mozilla::DebugOnly<nsresult> rv = thread->GetCanInvokeJS(&result); MOZ_ASSERT(NS_SUCCEEDED(rv)); return result;#endif}
开发者ID:nwgh,项目名称:gecko-dev,代码行数:17,
示例21: FCIMPL2// Block waiting for data to become available on the console stream indicated by the safe file handle passed.// Ensure that the thread remains abortable in the process.FCIMPL2(void, ConsoleStreamHelper::WaitForAvailableConsoleInput, SafeHandle* refThisUNSAFE, CLR_BOOL bIsPipe){ FCALL_CONTRACT; SAFEHANDLEREF refConsoleHandle(refThisUNSAFE); HELPER_METHOD_FRAME_BEGIN_1(refConsoleHandle); // Prevent the console handle being closed under our feet. SafeHandleHolder shh(&refConsoleHandle); // Don't pass the address of the native handle within the safe handle to DoAppropriateWait since the safe // handle is on the GC heap and could be moved. Instead copy the native handle out into a stack location // (this is safe because we've ref-counted the safe handle to prevent it being disposed on us). HANDLE hNativeConsoleHandle = refConsoleHandle->GetHandle(); bool skipWait = false; // If we are reading from a pipe and the other end of the pipe was closed, then do not block. No one can write to it. // Also we can skip blocking if we do have data available. We should block if nothing is available, with the assumption // that Windows is smart enough to handle pipes where the other end is closed. if (bIsPipe) { DWORD cBytesRead, cTotalBytesAvailable, cBytesLeftThisMessage; int r = PeekNamedPipe(hNativeConsoleHandle, NULL, 0, &cBytesRead, &cTotalBytesAvailable, &cBytesLeftThisMessage); if (r != 0) { skipWait = cTotalBytesAvailable > 0; } else { // Windows returns ERROR_BROKEN_PIPE if the other side of a pipe is closed. However, we've seen // pipes return ERROR_NO_DATA and ERROR_PIPE_NOT_CONNECTED. Check for those too. int errorCode = GetLastError(); skipWait = errorCode == ERROR_BROKEN_PIPE || errorCode == ERROR_NO_DATA || errorCode == ERROR_PIPE_NOT_CONNECTED; } } // Perform the wait (DoAppropriateWait automatically handles thread aborts). if (!skipWait) { GetThread()->DoAppropriateWait(1, &hNativeConsoleHandle, TRUE, INFINITE, WaitMode_Alertable); } HELPER_METHOD_FRAME_END();}
开发者ID:0xMF,项目名称:coreclr,代码行数:48,
示例22: MOZ_ASSERTvoidGetAddrInfoOperator::Reply(DNSServiceRef aSdRef, DNSServiceFlags aFlags, uint32_t aInterfaceIndex, DNSServiceErrorType aErrorCode, const nsACString& aHostName, const NetAddr& aAddress, uint32_t aTTL){ MOZ_ASSERT(GetThread() == NS_GetCurrentThread()); auto guard = MakeScopeExit([&] { Unused << NS_WARN_IF(NS_FAILED(Stop())); }); if (NS_WARN_IF(kDNSServiceErr_NoError != aErrorCode)) { LOG_E("GetAddrInfoOperator::Reply (%d)", aErrorCode); return; } if (!mListener) { return; } NetAddr addr = aAddress; nsCOMPtr<nsINetAddr> address = new nsNetAddr(&addr); nsCString addressStr; if (NS_WARN_IF(NS_FAILED(address->GetAddress(addressStr)))) { return; } nsCOMPtr<nsIDNSServiceInfo> info = new nsDNSServiceInfo(mServiceInfo); if (NS_WARN_IF(NS_FAILED(info->SetAddress(addressStr)))) { return; } /** * |kDNSServiceFlagsMoreComing| means this callback will be one or more * callback events later, so this instance should be kept alive until all * follow-up events are processed. */ if (aFlags & kDNSServiceFlagsMoreComing) { guard.release(); } if (kDNSServiceErr_NoError == aErrorCode) { mListener->OnServiceResolved(info); } else { mListener->OnResolveFailed(info, aErrorCode); }}
开发者ID:Wafflespeanut,项目名称:gecko-dev,代码行数:45,
示例23: GetThreadvoid PacketManager::ExternalAddPacket(int socket, const char *data, int length) { if (length == 0) { g_Logs.server->error("Cannot add packet of zero size."); return; } Packet packet; packet.Assign(data, length); GetThread("PacketManager::ExternalAddPacket"); PendingSocket *pSock = GetPendingSocket(socket); if (pSock != NULL) pSock->mPacketList.push_back(packet); //Clustering will be performed when the thread grabs and sorts this pending data. else g_Logs.server->error("Could not retrieve a PendingSocket object."); ReleaseThread();}
开发者ID:kgrubb,项目名称:iceee,代码行数:18,
示例24: whilewxThread::ExitCode TaskBase::Entry(){ // here we do our long task, periodically calling TestDestroy(): // TODO(JK#1#2017-09-29): do not use _running to stop the task but another variable. Use _running = false here to check afterwards if running while (_running && !GetThread()->TestDestroy()) { update(); // give other tasks some time wxMilliSleep(1); } // call onStop whenever the thread exits its main loop (i.e is stopped by user or system) onStop(); // reset recording state _recording = false; // TestDestroy() returned true (which means the main thread asked us // to terminate as soon as possible) or we ended the long task... return (wxThread::ExitCode)0;}
开发者ID:JochenKempfle,项目名称:MoCap,代码行数:18,
示例25: HndCreateHandle/* * HndCreateHandle * * Entrypoint for allocating an individual handle. * */OBJECTHANDLE HndCreateHandle(HHANDLETABLE hTable, UINT uType, OBJECTREF object, LPARAM lExtraInfo){ // update perf-counters: track number of handles COUNTER_ONLY(GetGlobalPerfCounters().m_GC.cHandles ++); COUNTER_ONLY(GetPrivatePerfCounters().m_GC.cHandles ++); VALIDATEOBJECTREF(object); // fetch the handle table pointer HandleTable *pTable = Table(hTable); // sanity check the type index _ASSERTE(uType < pTable->uTypeCount); // get a handle from the table's cache OBJECTHANDLE handle = TableAllocSingleHandleFromCache(pTable, uType); // did the allocation succeed? if (handle) { // yep - the handle better not point at anything yet _ASSERTE(*(_UNCHECKED_OBJECTREF *)handle == NULL); // we are not holding the lock - check to see if there is nonzero extra info if (lExtraInfo) { // initialize the user data BEFORE assigning the referent // this ensures proper behavior if we are currently scanning HandleQuickSetUserData(handle, lExtraInfo); } // store the referent HndAssignHandle(handle, object); } else FailFast(GetThread(), FatalOutOfMemory);#ifdef _DEBUG DEBUG_TrackAlloc(handle);#endif // return the result return handle;}
开发者ID:ArildF,项目名称:masters,代码行数:50,
示例26: GetThreadvoid SceneryManager::RunGarbageCheck(void){ if(mActiveLocations.size() == 0) return; ActiveLocation::CONTAINER perZone; ITERATOR zoneit; GetThread("SceneryManager::RunGarbageCheck"); zoneit = mZones.begin(); while(zoneit != mZones.end()) { //Build a list of all active locations that match this zone. for(size_t i = 0; i < mActiveLocations.size(); i++) { if(mActiveLocations[i] == zoneit->second.mZone) perZone.push_back(mActiveLocations[i]); /* if(mActiveLocations[i].mZoneID == zoneit->second.mZone) perZone.push_back(mActiveLocations[i]); */ } //Pass the filtered active locations to the zone's garbage checker. //Since unmatched zones are filtered out, fewer iterations are needed for each tile. zoneit->second.RemoveInactiveTiles(perZone); if(perZone.size() > 0) perZone.clear(); if(zoneit->second.GetTileCount() == 0) { g_Log.AddMessageFormat("[SCENERY] Removing inactive Zone: %d", zoneit->second.mZone); mZones.erase(zoneit++); } else zoneit++; } mActiveLocations.clear(); ReleaseThread();}
开发者ID:tremblewithfear6,项目名称:iceee,代码行数:43,
示例27: BEGINCANNOTTHROWCOMPLUSEXCEPTIONHRESULT CorHost::CreateEvidence(IUnknown **pEvidence){ HRESULT hr = S_OK; if (!pEvidence) return E_POINTER; BEGINCANNOTTHROWCOMPLUSEXCEPTION(); // Create the domain. Thread* pThread = GetThread(); if (!pThread) IfFailGo(E_UNEXPECTED); IfFailGo(QuickCOMStartup()); BOOL fWasGCEnabled; fWasGCEnabled = !pThread->PreemptiveGCDisabled(); if (fWasGCEnabled) pThread->DisablePreemptiveGC(); COMPLUS_TRY { struct _gc { OBJECTREF pEvidence; } gc; ZeroMemory(&gc, sizeof(gc)); MethodTable* pMT = g_Mscorlib.GetClass(CLASS__EVIDENCE); GCPROTECT_BEGIN(gc); gc.pEvidence = AllocateObject(pMT); IfFailThrow(QuickCOMStartup()); *pEvidence = GetComIPFromObjectRef((OBJECTREF*) &gc.pEvidence); GCPROTECT_END(); } COMPLUS_CATCH { hr = SecurityHelper::MapToHR(GETTHROWABLE()); } COMPLUS_END_CATCH if (fWasGCEnabled) pThread->EnablePreemptiveGC();ErrExit: ENDCANNOTTHROWCOMPLUSEXCEPTION(); return hr;}
开发者ID:ArildF,项目名称:masters,代码行数:42,
示例28: OnContextMenuvoid LLDBThreadsView::OnContextMenu(wxDataViewEvent& event){ wxDataViewItemArray items; m_dvListCtrlThreads->GetSelections(items); std::vector<int> threadIds; for(size_t i = 0; i < items.GetCount(); ++i) { const auto& item = items.Item(i); const auto cd = reinterpret_cast<LLDBThreadViewClientData*>(m_dvListCtrlThreads->GetItemData(item)); if(cd) { const auto threadId = cd->GetThread().GetId(); if(threadId != wxNOT_FOUND) { threadIds.push_back(threadId); } } } wxMenu menu; if(!threadIds.empty()) { const auto suffix = (threadIds.size() > 1) ? wxT("s") : wxT(""); menu.Append(lldbSuspendThreadIds, wxString("Suspend thread") << suffix); menu.Append(lldbSuspendOtherThreadIds, wxString("Suspend other threads")); menu.AppendSeparator(); menu.Append(lldbResumeThreadIds, wxString("Resume thread") << suffix); menu.Append(lldbResumeOtherThreadIds, wxString("Resume other threads")); } menu.Append(lldbResumeAllThreadsId, wxString("Resume all threads")); const auto sel = GetPopupMenuSelectionFromUser(menu); if(lldbSuspendThreadIds == sel) { m_plugin->GetLLDB()->SuspendThreads(threadIds); } else if(lldbSuspendOtherThreadIds == sel) { m_plugin->GetLLDB()->SuspendOtherThreads(threadIds); } else if(lldbResumeThreadIds == sel) { m_plugin->GetLLDB()->ResumeThreads(threadIds); } else if(lldbResumeOtherThreadIds == sel) { m_plugin->GetLLDB()->ResumeOtherThreads(threadIds); } else if(lldbResumeAllThreadsId == sel) { m_plugin->GetLLDB()->ResumeAllThreads(); }}
开发者ID:eranif,项目名称:codelite,代码行数:41,
示例29: GetThread// Return per-thread allocation information.HRESULT CorHost::GetThreadStats( DWORD *pFiberCookie, COR_GC_THREAD_STATS *pStats){ Thread *pThread; // Get the thread from the caller or the current thread. if (!pFiberCookie) pThread = GetThread(); else pThread = (Thread *) pFiberCookie; if (!pThread) return (E_INVALIDARG); // Get the allocation context which contains this counter in it. alloc_context *p = &pThread->m_alloc_context; pStats->PerThreadAllocation = p->alloc_bytes; if (pThread->GetHasPromotedBytes()) pStats->Flags = COR_GC_THREAD_HAS_PROMOTED_BYTES; return (S_OK);}
开发者ID:ArildF,项目名称:masters,代码行数:22,
注:本文中的GetThread函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ GetThreadContext函数代码示例 C++ GetTextPeer函数代码示例 |