Changeset 22916 in vbox
- Timestamp:
- Sep 10, 2009 1:45:12 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/glue/EventQueue.cpp
r22911 r22916 187 187 return VINF_SUCCESS; 188 188 189 if (orc != kCFRunLoopRunTimedOut) 189 if (orc != kCFRunLoopRunTimedOut) 190 190 { 191 191 NS_WARNING("Unexpected status code from CFRunLoopRunInMode"); … … 210 210 break; 211 211 rc = VINF_SUCCESS; 212 } 212 } 213 213 return rc; 214 214 } … … 218 218 public: 219 219 HANDLE mh; 220 220 221 221 MyThreadHandle() 222 222 { 223 if (!DuplicateHandle(GetCurrentProcess(), 224 GetCurrentThread(), 223 if (!DuplicateHandle(GetCurrentProcess(), 224 GetCurrentThread(), 225 225 GetCurrentProcess(), 226 &mh, 227 0 /*dwDesiredAccess*/, 226 &mh, 227 0 /*dwDesiredAccess*/, 228 228 FALSE /*bInheritHandle*/, 229 229 DUPLICATE_SAME_ACCESS)) … … 243 243 /** @todo: rethink interruption events, current NULL event approach is bad */ 244 244 pQueue->ProcessPendingEvents(); 245 return VINF_SUCCESS; 245 return VINF_SUCCESS; 246 246 } 247 247 #endif … … 254 254 PRBool fHasEvents = PR_FALSE; 255 255 nsresult rc; 256 257 rc = mEventQ->PendingEvents(&fHasEvents); 256 257 rc = mEventQ->PendingEvents(&fHasEvents); 258 258 if (NS_FAILED (rc)) 259 259 return VERR_INTERNAL_ERROR_3; … … 284 284 #endif 285 285 } 286 286 287 287 /* Bit tricky part - perform timed wait */ 288 288 # ifdef RT_OS_DARWIN … … 292 292 fd_set fdsetR, fdsetE; 293 293 struct timeval tv; 294 294 295 295 FD_ZERO(&fdsetR); 296 296 FD_SET(fd, &fdsetR); 297 297 298 298 fdsetE = fdsetR; 299 299 tv.tv_sec = (PRInt64)cMsTimeout / 1000; … … 307 307 else if (aCode < 0) 308 308 rc = VERR_INTERNAL_ERROR_4; 309 310 # endif 309 310 # endif 311 311 } while (0); 312 312 … … 314 314 #else /* Windows */ 315 315 do { 316 int aCode = processPendingEvents OnWindows();316 int aCode = processPendingEvents(); 317 317 if (aCode != VERR_TIMEOUT || cMsTimeout == 0) 318 318 { … … 320 320 break; 321 321 } 322 322 323 323 if (cMsTimeout == RT_INDEFINITE_WAIT) 324 324 { 325 325 Event* aEvent = NULL; 326 326 327 327 BOOL fHasEvent = waitForEvent(&aEvent); 328 328 if (fHasEvent) … … 336 336 MyThreadHandle aHandle; 337 337 338 DWORD aCode2 = MsgWaitForMultipleObjects(1, &aHandle.mh, 339 TRUE /*fWaitAll*/, 340 0 /*ms*/, 338 DWORD aCode2 = MsgWaitForMultipleObjects(1, &aHandle.mh, 339 TRUE /*fWaitAll*/, 340 0 /*ms*/, 341 341 QS_ALLINPUT); 342 342 if (aCode2 == WAIT_TIMEOUT) … … 485 485 } 486 486 /* namespace com */ 487
Note:
See TracChangeset
for help on using the changeset viewer.