Changeset 75601 in vbox for trunk/src/VBox/Main
- Timestamp:
- Nov 19, 2018 9:22:15 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 126771
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/HGCMThread.cpp
r75541 r75601 85 85 RTTHREAD m_hThread; 86 86 87 /* Event the thread waits for, signalled when a message 88 * to process is posted to the thread. 89 */ 90 RTSEMEVENTMULTI m_eventThread; 87 /** Event the thread waits for, signalled when a message to process is posted to 88 * the thread, automatically reset. */ 89 RTSEMEVENT m_eventThread; 91 90 92 91 /* A caller thread waits for completion of a SENT message on this event. */ … … 216 215 m_pvUser(NULL), 217 216 m_hThread(NIL_RTTHREAD), 218 m_eventThread(NIL_RTSEMEVENT MULTI),217 m_eventThread(NIL_RTSEMEVENT), 219 218 m_eventSend(NIL_RTSEMEVENTMULTI), 220 219 m_i32MessagesProcessed(0), … … 247 246 } 248 247 249 if (m_eventThread != NIL_RTSEMEVENT MULTI)250 { 251 RTSemEvent MultiDestroy(m_eventThread);252 m_eventThread = NIL_RTSEMEVENT MULTI;248 if (m_eventThread != NIL_RTSEMEVENT) 249 { 250 RTSemEventDestroy(m_eventThread); 251 m_eventThread = NIL_RTSEMEVENT; 253 252 } 254 253 } … … 268 267 int HGCMThread::Initialize(const char *pszThreadName, PFNHGCMTHREAD pfnThread, void *pvUser, const char *pszStatsSubDir, PUVM pUVM) 269 268 { 270 int rc = RTSemEvent MultiCreate(&m_eventThread);269 int rc = RTSemEventCreate(&m_eventThread); 271 270 272 271 if (RT_SUCCESS(rc)) … … 340 339 { 341 340 Log(("hgcmThreadCreate: FAILURE: Can't create an event semaphore for a hgcm worker thread.\n")); 342 m_eventThread = NIL_RTSEMEVENT MULTI;341 m_eventThread = NIL_RTSEMEVENT; 343 342 } 344 343 … … 443 442 444 443 /* Inform the worker thread that there is a message. */ 445 RTSemEvent MultiSignal(m_eventThread);444 RTSemEventSignal(m_eventThread); 446 445 447 446 LogFlow(("HGCMThread::MsgPost: event signalled\n")); … … 453 452 { 454 453 /* Poll infrequently to make sure no completed message has been missed. */ 455 RTSemEventMultiWait 454 RTSemEventMultiWait(m_eventSend, 1000); 456 455 457 456 LogFlow(("HGCMThread::MsgPost: wait completed flags = %08X\n", pMsg->m_fu32Flags)); … … 548 547 549 548 /* Wait for an event. */ 550 RTSemEventMultiWait (m_eventThread, RT_INDEFINITE_WAIT); 551 RTSemEventMultiReset (m_eventThread); 549 RTSemEventWait(m_eventThread, RT_INDEFINITE_WAIT); 552 550 } 553 551
Note:
See TracChangeset
for help on using the changeset viewer.