logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

include/Zycore/Atomic.h

Author

       Generated automatically by Doxygen for Zycore from the source code.

Zycore                                           Version 1.5.2.0                      include/Zycore/Atomic.h(3)

Detailed Description

       Cross compiler atomic intrinsics.

Macro Definition Documentation

#defineZYAN_ATOMIC_COMPARE_EXCHANGE(destination,comparand,value)ZyanAtomicCompareExchange((ZyanAtomicPointer*)&(destination),(comparand),(value))
       Compares two values for equality and, if they are equal, replaces the first value.

       Parametersdestination A pointer to the destination value.
           comparand The value to compare with.
           value The replacement value.

       Returns
           The original value.

   #defineZYAN_ATOMIC_COMPARE_EXCHANGE32(destination,comparand,value)ZyanAtomicCompareExchange32((ZyanAtomic32*)&(destination),(comparand),(value))
       Compares two values for equality and, if they are equal, replaces the first value.

       Parametersdestination A pointer to the destination value.
           comparand The value to compare with.
           value The replacement value.

       Returns
           The original value.

   #defineZYAN_ATOMIC_COMPARE_EXCHANGE64(destination,comparand,value)ZyanAtomicCompareExchange64((ZyanAtomic64*)&(destination),(comparand),(value))
       Compares two values for equality and, if they are equal, replaces the first value.

       Parametersdestination A pointer to the destination value.
           comparand The value to compare with.
           value The replacement value.

       Returns
           The original value.

   #defineZYAN_ATOMIC_DECREMENT(destination)ZyanAtomicDecrement((ZyanAtomicPointer*)&(destination));
       Decrements the given value and stores the result, as an atomic operation.

       Parametersdestination A pointer to the destination value.

       Returns
           The decremented value.

   #defineZYAN_ATOMIC_DECREMENT32(destination)ZyanAtomicDecrement32((ZyanAtomic32*)&(destination));
       Decrements the given value and stores the result, as an atomic operation.

       Parametersdestination A pointer to the destination value.

       Returns
           The decremented value.

   #defineZYAN_ATOMIC_DECREMENT64(destination)ZyanAtomicDecrement64((ZyanAtomic64*)&(destination));
       Decrements the given value and stores the result, as an atomic operation.

       Parametersdestination A pointer to the destination value.

       Returns
           The decremented value.

   #defineZYAN_ATOMIC_INCREMENT(destination)ZyanAtomicIncrement((ZyanAtomicPointer*)&(destination));
       Increments the given value and stores the result, as an atomic operation.

       Parametersdestination A pointer to the destination value.

       Returns
           The incremented value.

   #defineZYAN_ATOMIC_INCREMENT32(destination)ZyanAtomicIncrement32((ZyanAtomic32*)&(destination));
       Increments the given value and stores the result, as an atomic operation.

       Parametersdestination A pointer to the destination value.

       Returns
           The incremented value.

   #defineZYAN_ATOMIC_INCREMENT64(destination)ZyanAtomicIncrement64((ZyanAtomic64*)&(destination));
       Increments the given value and stores the result, as an atomic operation.

       Parametersdestination A pointer to the destination value.

       Returns
           The incremented value.

Name

       include/Zycore/Atomic.h

Synopsis

       #include <Zycore/Defines.h>
       #include <Zycore/Types.h>

   Classes
       struct ZyanAtomic32_
       struct ZyanAtomic64_
       struct ZyanAtomicPointer_Macros
       #define ZYAN_ATOMIC_COMPARE_EXCHANGE(destination,  comparand,  value)
           ZyanAtomicCompareExchange((ZyanAtomicPointer*)&(destination), (comparand), (value))
       #define ZYAN_ATOMIC_INCREMENT(destination)       ZyanAtomicIncrement((ZyanAtomicPointer*)&(destination));
       #define ZYAN_ATOMIC_DECREMENT(destination)       ZyanAtomicDecrement((ZyanAtomicPointer*)&(destination));
       #define ZYAN_ATOMIC_COMPARE_EXCHANGE32(destination,  comparand,  value)
           ZyanAtomicCompareExchange32((ZyanAtomic32*)&(destination), (comparand), (value))
       #define ZYAN_ATOMIC_INCREMENT32(destination)       ZyanAtomicIncrement32((ZyanAtomic32*)&(destination));
       #define ZYAN_ATOMIC_DECREMENT32(destination)       ZyanAtomicDecrement32((ZyanAtomic32*)&(destination));
       #define ZYAN_ATOMIC_COMPARE_EXCHANGE64(destination,  comparand,  value)
           ZyanAtomicCompareExchange64((ZyanAtomic64*)&(destination), (comparand), (value))
       #define ZYAN_ATOMIC_INCREMENT64(destination)       ZyanAtomicIncrement64((ZyanAtomic64*)&(destination));
       #define ZYAN_ATOMIC_DECREMENT64(destination)       ZyanAtomicDecrement64((ZyanAtomic64*)&(destination));

   Typedefs
       typedef struct ZyanAtomic32_ZyanAtomic32
       typedef struct ZyanAtomic64_ZyanAtomic64
       typedef struct ZyanAtomicPointer_ZyanAtomicPointer

See Also