VirtualBox

Changeset 5212 in vbox for trunk/src/VBox/Runtime/r0drv


Ignore:
Timestamp:
Oct 9, 2007 6:43:56 PM (17 years ago)
Author:
vboxsync
Message:

Solaris.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/solaris/semevent-r0drv-solaris.c

    r4287 r5212  
    134134}
    135135
    136 RTDECL(int)  RTSemEventWait(RTSEMEVENT EventSem, unsigned cMillies)
     136static int rtSemEventWait(RTSEMEVENT EventSem, unsigned cMillies, bool fInterruptible)
    137137{
    138138    int rc;
     
    163163            cTicks = 0;
    164164        timeout += cTicks;
    165        
     165
    166166        ASMAtomicIncU32(&pEventInt->cWaiters);
    167167
    168         /** @todo r=bird: Is this interruptible or non-interruptible? */
    169         rc = cv_timedwait_sig(&pEventInt->Cnd, &pEventInt->Mtx, timeout);
     168        if (fInterruptible)
     169            rc = cv_timedwait_sig(&pEventInt->Cnd, &pEventInt->Mtx, timeout);
     170        else
     171            rc = cv_timedwait(&pEventInt->Cnd, &pEventInt->Mtx, timeout);
     172
    170173        if (rc > 0)
    171174        {
     
    207210}
    208211
    209 /** @todo Implement RTSemEventWaitNoResume (interruptible variant of the uninterruptible RTSemEventWait()). */
    210 
     212
     213RTDECL(int)  RTSemEventWait(RTSEMEVENT EventSem, unsigned cMillies)
     214{
     215    return rtSemEventWait(EventSem, cMillies, false /* not interruptible */);
     216}
     217
     218
     219RTDECL(int)  RTSemEventWaitNoResume(RTSEMEVENT EventSem, unsigned cMillies)
     220{
     221    return rtSemEventWait(EventSem, cMillies, true /* interruptible */);
     222}
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