VirtualBox

Changeset 198 in vbox for trunk/src/VBox/Runtime/generic


Ignore:
Timestamp:
Jan 20, 2007 2:08:31 AM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
17674
Message:

thread safe handle invalidating.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/generic/timer-generic.cpp

    r197 r198  
    4545     * This is RTTIMER_MAGIC, but changes to something else before the timer
    4646     * is destroyed to indicate clearly that thread should exit. */
    47     volatile uint32_t       u32Magic;
     47    uint32_t volatile       u32Magic;
    4848    /** Flag indicating the the timer is suspended. */
    4949    uint8_t volatile        fSuspended;
     
    277277     * Release the timer resources.
    278278     */
    279     pTimer->u32Magic++;
     279    ASMAtomicIncU32(&pTimer->u32Magic); /* make the handle invalid. */
    280280    int rc = RTSemEventDestroy(pTimer->Event); AssertRC(rc);
    281281    pTimer->Event = NIL_RTSEMEVENT;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette