Logo Search packages:      
Sourcecode: mingw-w64 version File versions  Download package

ilockadd64.c

#include <intrin.h>

__int64 _InterlockedAdd64(__int64 volatile *, __int64);                 /* not in intrin.h */
__int64 _InterlockedAdd64(__int64 volatile *Addend, __int64 Value)
{
/* return InterlockedExchangeAdd64(Addend,Value) + Value; */
  __int64 ret;
  __asm__ __volatile__ ("lock\n\t"
           "xaddq %0,(%1)"
           : "=r" (ret)
           : "r" (Addend), "0" (Value)
           : "memory");
  return ret + Value;
}

__int64 InterlockedAdd64(__int64 volatile *, __int64) __attribute__((alias("_InterlockedAdd64")));


Generated by  Doxygen 1.6.0   Back to index