third_party/virtualbox/src/VBox/Devices/Network/DevE1000.cpp
/**
 * Default register read handler with automatic clear operation.
 *
 * Retrieves the value of register from register array in device state structure.
 * Then resets all bits.
 *
 * @remarks The 'mask' parameter is simply ignored as masking and shifting is
 *          done in the caller.
 *
 * @returns VBox status code.
 *
 * @param   pThis       The device state structure.
 * @param   offset      Register offset in memory-mapped frame.
 * @param   index       Register index in register array.
 * @thread  EMT
 */
Default register read handler with automatic clear operation.
Retrieves the value of register from register array in device state structure.
Then resets all bits.

@remarks The 'mask' parameter is simply ignored as masking and shifting is
done in the caller.

@returns VBox status code.

@param   pThis       The device state structure.
@param   offset      Register offset in memory-mapped frame.
@param   index       Register index in register array.
@thread  EMT
Default register read handler with automatic clear operation . Retrieves the value of register from register array in device state structure . Then resets all bits . @remarks The ' mask ' parameter is simply ignored as masking and shifting is done in the caller . @returns VBox status code . @param pThis The device state structure . @param offset Register offset in memory - mapped frame . @param index Register index in register array . @thread EMT
static int e1kRegReadAutoClear(PE1KSTATE pThis, uint32_t offset, uint32_t index, uint32_t *pu32Value)
{
    AssertReturn(index < E1K_NUM_OF_32BIT_REGS, VERR_DEV_IO_ERROR);
    int rc = e1kRegReadDefault(pThis, offset, index, pu32Value);
    pThis->auRegs[index] = 0;
    return rc;
}
static int e1kRegReadAutoClear ( PE1KSTATE pThis , uint32_t offset , uint32_t index , uint32_t * pu32Value ) { AssertReturn ( index < E1K_NUM_OF_32BIT_REGS , VERR_DEV_IO_ERROR ) ; int rc = e1kRegReadDefault ( pThis , offset , index , pu32Value ) ; pThis -> auRegs [ index ] = 0 ; return rc ; }
Default register read handler with automatic clear operation.
Default register read handler with automatic clear operation .