xrootd
Loading...
Searching...
No Matches
Macros
XrdSysAtomics.hh File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define AtomicBeg(Mtx)   Mtx.Lock()
 
#define AtomicEnd(Mtx)   Mtx.UnLock()
 
#define AtomicAdd(x, y)   x += y
 
#define AtomicFAdd(w, x, y)   {w = x; x += y;}
 
#define AtomicCAS(x, y, z)   if (x == y) x = z
 
#define AtomicDec(x)   x--
 
#define AtomicFAZ(x)   x; x = 0
 
#define AtomicFZAP(w, x)   {w = x; x = 0;}
 
#define AtomicGet(x)   x
 
#define AtomicInc(x)   x++
 
#define AtomicSub(x, y)   x -= y
 
#define AtomicFSub(w, x, y)   {w = x; x -= y;}
 
#define AtomicZAP(x)   x = 0
 
#define AtomicRet(mtx, x)
 
#define CPP_ATOMIC_LOAD(x, order)   x
 
#define CPP_ATOMIC_STORE(x, val, order)   x = val
 
#define CPP_ATOMIC_TYPE(kind)   kind
 

Macro Definition Documentation

◆ AtomicAdd

#define AtomicAdd (   x,
 
)    x += y

◆ AtomicBeg

#define AtomicBeg (   Mtx)    Mtx.Lock()

◆ AtomicCAS

#define AtomicCAS (   x,
  y,
 
)    if (x == y) x = z

◆ AtomicDec

#define AtomicDec (   x)    x--

◆ AtomicEnd

#define AtomicEnd (   Mtx)    Mtx.UnLock()

◆ AtomicFAdd

#define AtomicFAdd (   w,
  x,
 
)    {w = x; x += y;}

◆ AtomicFAZ

#define AtomicFAZ (   x)    x; x = 0

◆ AtomicFSub

#define AtomicFSub (   w,
  x,
 
)    {w = x; x -= y;}

◆ AtomicFZAP

#define AtomicFZAP (   w,
 
)    {w = x; x = 0;}

◆ AtomicGet

#define AtomicGet (   x)    x

◆ AtomicInc

#define AtomicInc (   x)    x++

◆ AtomicRet

#define AtomicRet (   mtx,
 
)
Value:
{mtx.Lock(); int _ ## x = x; \
mtx.UnLock(); return _ ## x;}

◆ AtomicSub

#define AtomicSub (   x,
 
)    x -= y

◆ AtomicZAP

#define AtomicZAP (   x)    x = 0

◆ CPP_ATOMIC_LOAD

#define CPP_ATOMIC_LOAD (   x,
  order 
)    x

◆ CPP_ATOMIC_STORE

#define CPP_ATOMIC_STORE (   x,
  val,
  order 
)    x = val

◆ CPP_ATOMIC_TYPE

#define CPP_ATOMIC_TYPE (   kind)    kind