VirtualBox

Ignore:
Timestamp:
Aug 11, 2015 2:39:19 PM (9 years ago)
Author:
vboxsync
Message:

iprt/r0drv/linux: Preserve EFLAGS/AC where ever it may possibly be thought to change when calling kernel code.

File:
1 edited

Legend:

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

    r56290 r57276  
    7373{
    7474    PRTSEMEVENTINTERNAL pThis;
     75    IPRT_LINUX_SAVE_EFL_AC();
    7576
    7677    AssertReturn(!(fFlags & ~(RTSEMEVENT_FLAGS_NO_LOCK_VAL | RTSEMEVENT_FLAGS_BOOTSTRAP_HACK)), VERR_INVALID_PARAMETER);
     
    8788
    8889    *phEventSem = pThis;
     90    IPRT_LINUX_RESTORE_EFL_AC();
    8991    return VINF_SUCCESS;
    9092}
     
    118120RTDECL(int)  RTSemEventDestroy(RTSEMEVENT hEventSem)
    119121{
     122    IPRT_LINUX_SAVE_EFL_AC();
     123
    120124    /*
    121125     * Validate input.
     
    135139    wake_up_all(&pThis->Head);
    136140    rtR0SemEventLnxRelease(pThis);
     141
     142    IPRT_LINUX_RESTORE_EFL_AC();
    137143    return VINF_SUCCESS;
    138144}
     
    142148RTDECL(int)  RTSemEventSignal(RTSEMEVENT hEventSem)
    143149{
     150    IPRT_LINUX_SAVE_EFL_AC();
     151
    144152    /*
    145153     * Validate input.
     
    157165
    158166    rtR0SemEventLnxRelease(pThis);
     167    IPRT_LINUX_RESTORE_EFL_AC();
    159168    return VINF_SUCCESS;
    160169}
     
    195204         * We have to wait.
    196205         */
     206        IPRT_LINUX_SAVE_EFL_AC();
    197207        RTR0SEMLNXWAIT Wait;
    198208        rc = rtR0SemLnxWaitInit(&Wait, fFlags, uTimeout, &pThis->Head);
     
    231241            IPRT_DEBUG_SEMS_STATE_RC(pThis, 'E', rc);
    232242        }
     243        IPRT_LINUX_RESTORE_EFL_AC();
    233244    }
    234245
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