upipe/uatomic.h header reference

Upipe thread-safe atomic operations More

Header inclusion  

Members  

Types  

Macros  

Description  

This API mimicks a partial C11 stdatomic implementation. Atomic variables must be initialized with uatomic_init before use, and released with uatomic_clean before deallocation.

Members detail  

#define UATOMIC_TEMPLATE(type, ctype, atomictype)  

This macro is declared in upipe/uatomic.h source file, line 81.

This macro defines a set of functions to manipulate atomic variables.

#define _UPIPE_UATOMIC_H_  

This macro is declared in upipe/uatomic.h source file, line 34.

#define uatomic_clean(a)  

This macro is declared in upipe/uatomic.h source file, line 59.

#define uatomic_compare_exchange  

This macro is declared in upipe/uatomic.h source file, line 61.

#define uatomic_fetch_add  

This macro is declared in upipe/uatomic.h source file, line 64.

#define uatomic_fetch_sub  

This macro is declared in upipe/uatomic.h source file, line 65.

#define uatomic_init  

This macro is declared in upipe/uatomic.h source file, line 53.

#define uatomic_load  

This macro is declared in upipe/uatomic.h source file, line 57.

#define uatomic_ptr_clean(a)  

This macro is declared in upipe/uatomic.h source file, line 60.

#define uatomic_ptr_compare_exchange  

This macro is declared in upipe/uatomic.h source file, line 62.

#define uatomic_ptr_compare_exchange_ptr(obj, expected, desired)  

This macro is declared in upipe/uatomic.h source file, line 273.

This declaration involves expansion of the UATOMIC_TEMPLATE macro.

This macro atomically replaces the uatomic pointer, if it contains an expected value, with a desired value.

Parameter list:

  • obj: pointer to a uatomic variable
  • expected: reference to expected value, overwritten with actual value if it fails
  • desired: desired value

The return value is false if the exchange failed

#define uatomic_ptr_init  

This macro is declared in upipe/uatomic.h source file, line 54.

#define uatomic_ptr_load  

This macro is declared in upipe/uatomic.h source file, line 58.

#define uatomic_ptr_load_ptr(obj, type)  

This macro is declared in upipe/uatomic.h source file, line 261.

This declaration involves expansion of the UATOMIC_TEMPLATE macro.

This macro loads an atomic pointer.

Parameter list:

  • obj: pointer to a uatomic variable
  • type: type of the pointer

The return value is the loaded value

#define uatomic_ptr_store  

This macro is declared in upipe/uatomic.h source file, line 56.

typedef void * uatomic_ptr_t  

This typedef is declared in upipe/uatomic.h source file, line 79.

This typedef defines an atomic pointer.

#define uatomic_store  

This macro is declared in upipe/uatomic.h source file, line 55.

typedef uint32_t uatomic_uint32_t  

This typedef is declared in upipe/uatomic.h source file, line 76.

This typedef defines an atomic 32-bits unsigned integer. ARM platforms do not support larger atomic operations.

See also uring_lifo and uring_fifo.

Valid XHTML 1.0 StrictGenerated by cmassiot on Fri Feb 2 23:57:19 2018 using MkDoc