VirtualBox

Changeset 1189 in vbox


Ignore:
Timestamp:
Mar 4, 2007 8:34:10 PM (18 years ago)
Author:
vboxsync
Message:

Corrected bug in the multiple release event semaphore wait code. Added a todo for a scheduling race condition on smp boxes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/darwin/semaphore-r0drv-darwin.cpp

    r403 r1189  
    185185        ASMAtomicIncU32(&pEventInt->cWaking);
    186186        thread_wakeup_prim((event_t)pEventInt, TRUE /* one thread */, THREAD_AWAKENED);
     187        /** @todo this isn't safe. a scheduling interrupt on the other cpu while we're in here
     188         * could cause the thread to be timed out before we manage to wake it up and the event
     189         * ends up in the wrong state. ditto for posix signals. */
    187190    }
    188191    else
     
    405408    int rc;
    406409    if (pEventMultiInt->fSignaled)
    407     {
    408         ASMAtomicXchgU8(&pEventMultiInt->fSignaled, false);
    409410        rc = VINF_SUCCESS;
    410     }
    411411    else
    412412    {
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