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

static void kPrfAtomicAdd32 ( volatile KU32 *  pu32,
const KU32  u32 
) [inline, static]

Atomically add a 32-bit integer to another.

Definition at line 431 of file kProfileR3.cpp.

#if defined(HAVE_INTRIN)
    _InterlockedExchangeAdd((volatile long *)pu32, (const long)u32);

#elif defined(__GNUC__)
    __asm__ __volatile__("lock; addl %0, %1\n\t"
                         : "=m" (*pu32)
                         : "r" (u32));

#elif _MSC_VER
        mov     edx, [pu32]
        mov     eax, dword ptr [u32]
        lock add [edx], eax

    *pu32 += u32;

Generated by  Doxygen 1.6.0   Back to index