51 #if !defined (PLIBSYS_H_INSIDE) && !defined (PLIBSYS_COMPILATION) 52 # error "Header files shouldn't be included directly, consider using <plibsys.h> instead." 55 #ifndef PLIBSYS_HEADER_PATOMIC_H 56 #define PLIBSYS_HEADER_PATOMIC_H P_LIB_API puint p_atomic_int_xor(volatile puint *atomic, puint val)
Atomically performs the bitwise 'xor' operation of atomic value and val storing the result back in at...
#define P_END_DECLS
Closes .h file declarations to be exported as C functions, should be always used after P_BEGIN_DECLS...
Definition: pmacros.h:299
P_LIB_API ppointer p_atomic_pointer_get(const volatile void *atomic)
Gets ppointer-sized value from atomic.
P_LIB_API pboolean p_atomic_pointer_compare_and_exchange(volatile void *atomic, ppointer oldval, ppointer newval)
Compares oldval with the value pointed to by atomic and if they are equal, atomically exchanges the v...
P_LIB_API void p_atomic_pointer_set(volatile void *atomic, ppointer val)
Sets val to ppointer-sized atomic.
P_LIB_API void p_atomic_int_inc(volatile pint *atomic)
Increments pint value from atomic by 1.
int pint
Type for an int.
Definition: ptypes.h:120
P_LIB_API pboolean p_atomic_int_dec_and_test(volatile pint *atomic)
Decrements pint value from atomic by 1 and tests the result for zero.
P_LIB_API pboolean p_atomic_is_lock_free(void)
Checks whether atomic operations are lock-free.
P_LIB_API psize p_atomic_pointer_and(volatile void *atomic, psize val)
Atomically performs the bitwise 'and' operation of ppointer-sized atomic value and val storing the re...
unsigned int psize
Type for a platform independent size_t.
Definition: ptypes.h:224
void * ppointer
Type for a pointer.
Definition: ptypes.h:109
P_LIB_API psize p_atomic_pointer_or(volatile void *atomic, psize val)
Atomically performs the bitwise 'or' operation of ppointer-sized atomic value and val storing the res...
signed int pboolean
Type for a bool.
Definition: ptypes.h:114
P_LIB_API pboolean p_atomic_int_compare_and_exchange(volatile pint *atomic, pint oldval, pint newval)
Compares oldval with the value pointed to by atomic and if they are equal, atomically exchanges the v...
P_LIB_API psize p_atomic_pointer_xor(volatile void *atomic, psize val)
Atomically performs the bitwise 'xor' operation of ppointer-sized atomic value and val storing the re...
P_LIB_API pint p_atomic_int_add(volatile pint *atomic, pint val)
Atomically adds pint value to atomic value.
P_BEGIN_DECLS P_LIB_API pint p_atomic_int_get(const volatile pint *atomic)
Gets pint value from atomic.
#define P_LIB_API
Exports a symbol from a shared library.
Definition: pmacros.h:138
P_LIB_API puint p_atomic_int_or(volatile puint *atomic, puint val)
Atomically performs the bitwise 'or' operation of atomic value and val storing the result back in ato...
unsigned int puint
Type for an unsigned int.
Definition: ptypes.h:129
P_LIB_API pssize p_atomic_pointer_add(volatile void *atomic, pssize val)
Atomically adds ppointer-sized value to atomic value.
P_LIB_API puint p_atomic_int_and(volatile puint *atomic, puint val)
Atomically performs the bitwise 'and' operation of atomic value and val storing the result back in at...
P_LIB_API void p_atomic_int_set(volatile pint *atomic, pint val)
Sets pint value to atomic.
signed int pssize
Type for a platform independent signed size_t.
Definition: ptypes.h:223
#define P_BEGIN_DECLS
Starts .h file declarations to be exported as C functions.
Definition: pmacros.h:298