Changeset 31453 in vbox for trunk/src/VBox/Runtime/r3/win
- Timestamp:
- Aug 8, 2010 1:30:35 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 64526
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/win/poll-win.cpp
r28800 r31453 552 552 } 553 553 554 RTDECL(int) RTPollSetEventsChange(RTPOLLSET hPollSet, uint32_t id, uint32_t fEvents) 555 { 556 /* 557 * Validate the input. 558 */ 559 RTPOLLSETINTERNAL *pThis = hPollSet; 560 AssertPtrReturn(pThis, VERR_INVALID_HANDLE); 561 AssertReturn(pThis->u32Magic == RTPOLLSET_MAGIC, VERR_INVALID_HANDLE); 562 AssertReturn(id != UINT32_MAX, VERR_INVALID_PARAMETER); 563 AssertReturn(!(fEvents & ~RTPOLL_EVT_VALID_MASK), VERR_INVALID_PARAMETER); 564 AssertReturn(fEvents, VERR_INVALID_PARAMETER); 565 566 /* 567 * Set the busy flag and do the job. 568 */ 569 AssertReturn(ASMAtomicCmpXchgBool(&pThis->fBusy, true, false), VERR_CONCURRENT_ACCESS); 570 571 int rc = VERR_POLL_HANDLE_ID_NOT_FOUND; 572 uint32_t i = pThis->cHandles; 573 while (i-- > 0) 574 if (pThis->paHandles[i].id == id) 575 { 576 pThis->aHandles[i].fEvents = fEvents; 577 rc = VINF_SUCCESS; 578 break; 579 } 580 581 ASMAtomicWriteBool(&pThis->fBusy, false); 582 return rc; 583 } 584 585
Note:
See TracChangeset
for help on using the changeset viewer.