Logo Search packages:      
Sourcecode: virtualbox-ose version File versions  Download package

#define ASMAtomicUoReadSize ( pu,
puRes   ) 


do { \
        switch (sizeof(*(pu))) { \
            case 1: *(uint8_t  *)(puRes) = ASMAtomicUoReadU8( (volatile uint8_t  *)(void *)(pu)); break; \
            case 2: *(uint16_t *)(puRes) = ASMAtomicUoReadU16((volatile uint16_t *)(void *)(pu)); break; \
            case 4: *(uint32_t *)(puRes) = ASMAtomicUoReadU32((volatile uint32_t *)(void *)(pu)); break; \
            case 8: *(uint64_t *)(puRes) = ASMAtomicUoReadU64((volatile uint64_t *)(void *)(pu)); break; \
            default: AssertMsgFailed(("ASMAtomicReadSize: size %d is not supported\n", sizeof(*(pu)))); \
        } \
    } while (0)
Atomically read a value which size might differ between platforms or compilers, unordered.

pu Pointer to the variable to read.
puRes Where to store the result.

Definition at line 4560 of file asm.h.

Referenced by RTDECL().

Generated by  Doxygen 1.6.0   Back to index