Changeset 64972 in vbox
- Timestamp:
- Dec 21, 2016 11:38:12 AM (8 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/ThreadTask.h
r64108 r64972 35 35 public: 36 36 ThreadTask(const Utf8Str &t) 37 : m_hThread(NIL_RTTHREAD) 38 , m_strTaskName(t) 37 : m_strTaskName(t) 39 38 , mAsync(false) 40 39 { } … … 54 53 static DECLCALLBACK(int) taskHandlerThreadProc(RTTHREAD thread, void *pvUser); 55 54 56 ThreadTask() : m_ hThread(NIL_RTTHREAD), m_strTaskName("GenericTask")55 ThreadTask() : m_strTaskName("GenericTask") 57 56 { } 58 57 59 58 /** The worker thread handle (may be invalid if the thread has shut down). */ 60 RTTHREAD m_hThread;61 59 Utf8Str m_strTaskName; 62 60 bool mAsync; -
trunk/src/VBox/Main/src-all/ThreadTask.cpp
r64108 r64972 88 88 HRESULT ThreadTask::createThreadInternal(RTTHREADTYPE enmType, PRTTHREAD phThread) 89 89 { 90 int vrc = RTThreadCreate(&m_hThread, 90 RTTHREAD hThread; 91 int vrc = RTThreadCreate(&hThread, 91 92 taskHandlerThreadProc, 92 93 (void *)this, … … 99 100 mAsync = true; 100 101 if (phThread) 101 *phThread = m_hThread;102 *phThread = hThread; 102 103 return S_OK; 103 104 } … … 124 125 pTask->handler(); 125 126 126 pTask->m_hThread = NIL_RTTHREAD; /* unnecessary, but whatever. */127 127 delete pTask; 128 128 return VINF_SUCCESS; -
trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp
r64964 r64972 3970 3970 } 3971 3971 3972 static DECLCALLBACK(int) fntSaveMediaRegistries( RTTHREAD ThreadSelf,void *pvUser);3972 static DECLCALLBACK(int) fntSaveMediaRegistries(void *pvUser); 3973 3973 3974 3974 class SaveMediaRegistriesDesc : public ThreadTask … … 3987 3987 try 3988 3988 { 3989 fntSaveMediaRegistries( m_hThread,this);3989 fntSaveMediaRegistries(this); 3990 3990 } 3991 3991 catch(...) … … 3998 3998 ComObjPtr<VirtualBox> pVirtualBox; 3999 3999 4000 friend DECLCALLBACK(int) fntSaveMediaRegistries( RTTHREAD ThreadSelf,void *pvUser);4000 friend DECLCALLBACK(int) fntSaveMediaRegistries(void *pvUser); 4001 4001 friend void VirtualBox::i_saveMediaRegistry(settings::MediaRegistry &mediaRegistry, 4002 4002 const Guid &uuidRegistry, … … 4004 4004 }; 4005 4005 4006 DECLCALLBACK(int) fntSaveMediaRegistries(RTTHREAD ThreadSelf, void *pvUser) 4007 { 4008 NOREF(ThreadSelf); 4006 DECLCALLBACK(int) fntSaveMediaRegistries(void *pvUser) 4007 { 4009 4008 SaveMediaRegistriesDesc *pDesc = (SaveMediaRegistriesDesc *)pvUser; 4010 4009 if (!pDesc)
Note:
See TracChangeset
for help on using the changeset viewer.