Final Platform Layer 0.9.8-beta
|
This category contains functions for handling atomic operations, such as Add, Compare And/Or Exchange, Fences, Loads/Stores, etc. More...
Functions | |
fpl_common_api void * | fplAtomicAddAndFetchPtr (volatile void **dest, const intptr_t addend) |
Adds the addend to destination pointer atomically and returns the result after the addition. | |
fpl_platform_api int32_t | fplAtomicAddAndFetchS32 (volatile int32_t *dest, const int32_t addend) |
Adds the addend to destination 32-bit signed integer atomically and returns the result after the addition. | |
fpl_platform_api int64_t | fplAtomicAddAndFetchS64 (volatile int64_t *dest, const int64_t addend) |
Adds the addend to destination 64-bit signed integer atomically and returns the result after the addition. | |
fpl_common_api size_t | fplAtomicAddAndFetchSize (volatile size_t *dest, const size_t addend) |
Adds the addend to destination size atomically and returns the result after the addition. | |
fpl_platform_api uint32_t | fplAtomicAddAndFetchU32 (volatile uint32_t *dest, const uint32_t addend) |
Adds the addend to destination 32-bit unsigned integer atomically and returns the result after the addition. | |
fpl_platform_api uint64_t | fplAtomicAddAndFetchU64 (volatile uint64_t *dest, const uint64_t addend) |
Adds the addend to destination 64-bit unsigned integer atomically and returns the result after the addition. | |
fpl_common_api void * | fplAtomicCompareAndSwapPtr (volatile void **dest, const void *comparand, const void *exchange) |
Compares a pointer with a comparand and swaps it when comparand matches the destination. | |
fpl_platform_api int32_t | fplAtomicCompareAndSwapS32 (volatile int32_t *dest, const int32_t comparand, const int32_t exchange) |
Compares a 32-bit signed integer with a comparand and swaps it when comparand matches the destination. | |
fpl_platform_api int64_t | fplAtomicCompareAndSwapS64 (volatile int64_t *dest, const int64_t comparand, const int64_t exchange) |
Compares a 64-bit signed integer with a comparand and swaps it when comparand matches the destination. | |
fpl_common_api size_t | fplAtomicCompareAndSwapSize (volatile size_t *dest, const size_t comparand, const size_t exchange) |
Compares a size with a comparand and swaps it when comparand matches the destination. | |
fpl_platform_api uint32_t | fplAtomicCompareAndSwapU32 (volatile uint32_t *dest, const uint32_t comparand, const uint32_t exchange) |
Compares a 32-bit unsigned integer with a comparand and swaps it when comparand matches the destination. | |
fpl_platform_api uint64_t | fplAtomicCompareAndSwapU64 (volatile uint64_t *dest, const uint64_t comparand, const uint64_t exchange) |
Compares a 64-bit unsigned integer with a comparand and swaps it when comparand matches the destination. | |
fpl_common_api void * | fplAtomicExchangePtr (volatile void **target, const void *value) |
Replaces a pointer with the given value atomically. | |
fpl_platform_api int32_t | fplAtomicExchangeS32 (volatile int32_t *target, const int32_t value) |
Replaces a 32-bit signed integer with the given value atomically. | |
fpl_platform_api int64_t | fplAtomicExchangeS64 (volatile int64_t *target, const int64_t value) |
Replaces a 64-bit signed integer with the given value atomically. | |
fpl_common_api size_t | fplAtomicExchangeSize (volatile size_t *target, const size_t value) |
Replaces a size with the given value atomically. | |
fpl_platform_api uint32_t | fplAtomicExchangeU32 (volatile uint32_t *target, const uint32_t value) |
Replaces a 32-bit unsigned integer with the given value atomically. | |
fpl_platform_api uint64_t | fplAtomicExchangeU64 (volatile uint64_t *target, const uint64_t value) |
Replaces a 64-bit unsigned integer with the given value atomically. | |
fpl_common_api void * | fplAtomicFetchAndAddPtr (volatile void **dest, const intptr_t addend) |
Adds a addend to the pointer atomically and returns the initial value before the add. | |
fpl_platform_api int32_t | fplAtomicFetchAndAddS32 (volatile int32_t *value, const int32_t addend) |
Adds a 32-bit signed integer to the value by the given addend atomically. | |
fpl_platform_api int64_t | fplAtomicFetchAndAddS64 (volatile int64_t *value, const int64_t addend) |
Adds a 64-bit signed integer to the value by the given addend atomically. | |
fpl_common_api size_t | fplAtomicFetchAndAddSize (volatile size_t *dest, const size_t addend) |
Adds a size to the value by the given addend atomically. | |
fpl_platform_api uint32_t | fplAtomicFetchAndAddU32 (volatile uint32_t *value, const uint32_t addend) |
Adds a 32-bit unsigned integer to the value by the given addend atomically. | |
fpl_platform_api uint64_t | fplAtomicFetchAndAddU64 (volatile uint64_t *value, const uint64_t addend) |
Adds a 64-bit unsigned integer to the value by the given addend atomically. | |
fpl_common_api void * | fplAtomicIncrementPtr (volatile void **dest) |
Increments/Advances the given pointer by one atomically. | |
fpl_platform_api int32_t | fplAtomicIncrementS32 (volatile int32_t *dest) |
Increments the given 32-bit signed integer by one atomically. | |
fpl_platform_api int64_t | fplAtomicIncrementS64 (volatile int64_t *dest) |
Increments the given 64-bit signed integer by one atomically. | |
fpl_common_api size_t | fplAtomicIncrementSize (volatile size_t *dest) |
Increments the given size by one atomically. | |
fpl_platform_api uint32_t | fplAtomicIncrementU32 (volatile uint32_t *dest) |
Increments the given 32-bit unsigned integer by one atomically. | |
fpl_platform_api uint64_t | fplAtomicIncrementU64 (volatile uint64_t *dest) |
Increments the given 64-bit unsigned integer by one atomically. | |
fpl_common_api bool | fplAtomicIsCompareAndSwapPtr (volatile void **dest, const void *comparand, const void *exchange) |
Compares a pointer with a comparand and swaps it when comparand matches the destination and returns a bool indicating the result. | |
fpl_platform_api bool | fplAtomicIsCompareAndSwapS32 (volatile int32_t *dest, const int32_t comparand, const int32_t exchange) |
Compares a 32-bit signed integer with a comparand and swaps it when comparand matches the destination and returns a bool indicating the result. | |
fpl_platform_api bool | fplAtomicIsCompareAndSwapS64 (volatile int64_t *dest, const int64_t comparand, const int64_t exchange) |
Compares a 64-bit signed integer with a comparand and swaps it when comparand matches the destination and returns a bool indicating the result. | |
fpl_common_api bool | fplAtomicIsCompareAndSwapSize (volatile size_t *dest, const size_t comparand, const size_t exchange) |
Compares a size with a comparand and swaps it when comparand matches the destination and returns a bool indicating the result. | |
fpl_platform_api bool | fplAtomicIsCompareAndSwapU32 (volatile uint32_t *dest, const uint32_t comparand, const uint32_t exchange) |
Compares a 32-bit unsigned integer with a comparand and swaps it when comparand matches the destination and returns a bool indicating the result. | |
fpl_platform_api bool | fplAtomicIsCompareAndSwapU64 (volatile uint64_t *dest, const uint64_t comparand, const uint64_t exchange) |
Compares a 64-bit unsigned integer with a comparand and swaps it when comparand matches the destination and returns a bool indicating the result. | |
fpl_common_api void * | fplAtomicLoadPtr (volatile void **source) |
Loads the pointer value atomically and returns the value. | |
fpl_platform_api int32_t | fplAtomicLoadS32 (volatile int32_t *source) |
Loads the 32-bit signed value atomically and returns the value. | |
fpl_platform_api int64_t | fplAtomicLoadS64 (volatile int64_t *source) |
Loads the 64-bit signed value atomically and returns the value. | |
fpl_common_api size_t | fplAtomicLoadSize (volatile size_t *source) |
Loads the size value atomically and returns the value. | |
fpl_platform_api uint32_t | fplAtomicLoadU32 (volatile uint32_t *source) |
Loads the 32-bit unsigned value atomically and returns the value. | |
fpl_platform_api uint64_t | fplAtomicLoadU64 (volatile uint64_t *source) |
Loads the 64-bit unsigned value atomically and returns the value. | |
fpl_platform_api void | fplAtomicReadFence () |
Inserts a memory read fence/barrier. | |
fpl_platform_api void | fplAtomicReadWriteFence () |
Inserts a memory read and write fence/barrier. | |
fpl_common_api void | fplAtomicStorePtr (volatile void **dest, const void *value) |
Overwrites the pointer value atomically. | |
fpl_platform_api void | fplAtomicStoreS32 (volatile int32_t *dest, const int32_t value) |
Overwrites the 32-bit signed value atomically. | |
fpl_platform_api void | fplAtomicStoreS64 (volatile int64_t *dest, const int64_t value) |
Overwrites the 64-bit signed value atomically. | |
fpl_common_api void | fplAtomicStoreSize (volatile size_t *dest, const size_t value) |
Overwrites the size value atomically. | |
fpl_platform_api void | fplAtomicStoreU32 (volatile uint32_t *dest, const uint32_t value) |
Overwrites the 32-bit unsigned value atomically. | |
fpl_platform_api void | fplAtomicStoreU64 (volatile uint64_t *dest, const uint64_t value) |
Overwrites the 64-bit unsigned value atomically. | |
fpl_platform_api void | fplAtomicWriteFence () |
Inserts a memory write fence/barrier. | |
This category contains functions for handling atomic operations, such as Add, Compare And/Or Exchange, Fences, Loads/Stores, etc.
fpl_common_api void * fplAtomicAddAndFetchPtr | ( | volatile void ** | dest, |
const intptr_t | addend | ||
) |
Adds the addend to destination pointer atomically and returns the result after the addition.
dest | The target value to add to. |
addend | The value used for adding. |
fpl_platform_api int32_t fplAtomicAddAndFetchS32 | ( | volatile int32_t * | dest, |
const int32_t | addend | ||
) |
Adds the addend to destination 32-bit signed integer atomically and returns the result after the addition.
dest | The target value to add to. |
addend | The value used for adding. |
fpl_platform_api int64_t fplAtomicAddAndFetchS64 | ( | volatile int64_t * | dest, |
const int64_t | addend | ||
) |
Adds the addend to destination 64-bit signed integer atomically and returns the result after the addition.
dest | The target value to add to. |
addend | The value used for adding. |
fpl_common_api size_t fplAtomicAddAndFetchSize | ( | volatile size_t * | dest, |
const size_t | addend | ||
) |
Adds the addend to destination size atomically and returns the result after the addition.
dest | The target value to add to. |
addend | The value used for adding. |
fpl_platform_api uint32_t fplAtomicAddAndFetchU32 | ( | volatile uint32_t * | dest, |
const uint32_t | addend | ||
) |
Adds the addend to destination 32-bit unsigned integer atomically and returns the result after the addition.
dest | The target value to add to. |
addend | The value used for adding. |
fpl_platform_api uint64_t fplAtomicAddAndFetchU64 | ( | volatile uint64_t * | dest, |
const uint64_t | addend | ||
) |
Adds the addend to destination 64-bit unsigned integer atomically and returns the result after the addition.
dest | The target value to add to. |
addend | The value used for adding. |
fpl_common_api void * fplAtomicCompareAndSwapPtr | ( | volatile void ** | dest, |
const void * | comparand, | ||
const void * | exchange | ||
) |
Compares a pointer with a comparand and swaps it when comparand matches the destination.
dest | The target value to write into |
comparand | The value to compare with |
exchange | The value to exchange with |
fpl_platform_api int32_t fplAtomicCompareAndSwapS32 | ( | volatile int32_t * | dest, |
const int32_t | comparand, | ||
const int32_t | exchange | ||
) |
Compares a 32-bit signed integer with a comparand and swaps it when comparand matches the destination.
dest | The target value to write into |
comparand | The value to compare with |
exchange | The value to exchange with |
fpl_platform_api int64_t fplAtomicCompareAndSwapS64 | ( | volatile int64_t * | dest, |
const int64_t | comparand, | ||
const int64_t | exchange | ||
) |
Compares a 64-bit signed integer with a comparand and swaps it when comparand matches the destination.
dest | The target value to write into |
comparand | The value to compare with |
exchange | The value to exchange with |
fpl_common_api size_t fplAtomicCompareAndSwapSize | ( | volatile size_t * | dest, |
const size_t | comparand, | ||
const size_t | exchange | ||
) |
Compares a size with a comparand and swaps it when comparand matches the destination.
dest | The target value to write into |
comparand | The value to compare with |
exchange | The value to exchange with |
fpl_platform_api uint32_t fplAtomicCompareAndSwapU32 | ( | volatile uint32_t * | dest, |
const uint32_t | comparand, | ||
const uint32_t | exchange | ||
) |
Compares a 32-bit unsigned integer with a comparand and swaps it when comparand matches the destination.
dest | The target value to write into |
comparand | The value to compare with |
exchange | The value to exchange with |
fpl_platform_api uint64_t fplAtomicCompareAndSwapU64 | ( | volatile uint64_t * | dest, |
const uint64_t | comparand, | ||
const uint64_t | exchange | ||
) |
Compares a 64-bit unsigned integer with a comparand and swaps it when comparand matches the destination.
dest | The target value to write into |
comparand | The value to compare with |
exchange | The value to exchange with |
fpl_common_api void * fplAtomicExchangePtr | ( | volatile void ** | target, |
const void * | value | ||
) |
Replaces a pointer with the given value atomically.
target | The target value to write into |
value | The source value used for exchange |
fpl_platform_api int32_t fplAtomicExchangeS32 | ( | volatile int32_t * | target, |
const int32_t | value | ||
) |
Replaces a 32-bit signed integer with the given value atomically.
target | The target value to write into |
value | The source value used for exchange |
fpl_platform_api int64_t fplAtomicExchangeS64 | ( | volatile int64_t * | target, |
const int64_t | value | ||
) |
Replaces a 64-bit signed integer with the given value atomically.
target | The target value to write into |
value | The source value used for exchange |
fpl_common_api size_t fplAtomicExchangeSize | ( | volatile size_t * | target, |
const size_t | value | ||
) |
Replaces a size with the given value atomically.
target | The target value to write into |
value | The source value used for exchange |
fpl_platform_api uint32_t fplAtomicExchangeU32 | ( | volatile uint32_t * | target, |
const uint32_t | value | ||
) |
Replaces a 32-bit unsigned integer with the given value atomically.
target | The target value to write into |
value | The source value used for exchange |
fpl_platform_api uint64_t fplAtomicExchangeU64 | ( | volatile uint64_t * | target, |
const uint64_t | value | ||
) |
Replaces a 64-bit unsigned integer with the given value atomically.
target | The target value to write into |
value | The source value used for exchange |
fpl_common_api void * fplAtomicFetchAndAddPtr | ( | volatile void ** | dest, |
const intptr_t | addend | ||
) |
Adds a addend to the pointer atomically and returns the initial value before the add.
dest | The target value to add to. |
addend | The value used for adding. |
fpl_platform_api int32_t fplAtomicFetchAndAddS32 | ( | volatile int32_t * | value, |
const int32_t | addend | ||
) |
Adds a 32-bit signed integer to the value by the given addend atomically.
value | The target value to add to. |
addend | The value used for adding. |
fpl_platform_api int64_t fplAtomicFetchAndAddS64 | ( | volatile int64_t * | value, |
const int64_t | addend | ||
) |
Adds a 64-bit signed integer to the value by the given addend atomically.
value | The target value to add to. |
addend | The value used for adding. |
fpl_common_api size_t fplAtomicFetchAndAddSize | ( | volatile size_t * | dest, |
const size_t | addend | ||
) |
Adds a size to the value by the given addend atomically.
dest | The target value to add to. |
addend | The value used for adding. |
fpl_platform_api uint32_t fplAtomicFetchAndAddU32 | ( | volatile uint32_t * | value, |
const uint32_t | addend | ||
) |
Adds a 32-bit unsigned integer to the value by the given addend atomically.
value | The target value to add to. |
addend | The value used for adding. |
fpl_platform_api uint64_t fplAtomicFetchAndAddU64 | ( | volatile uint64_t * | value, |
const uint64_t | addend | ||
) |
Adds a 64-bit unsigned integer to the value by the given addend atomically.
value | The target value to add to. |
addend | The value used for adding. |
fpl_common_api void * fplAtomicIncrementPtr | ( | volatile void ** | dest | ) |
Increments/Advances the given pointer by one atomically.
dest | The target value to increment to. |
fpl_platform_api int32_t fplAtomicIncrementS32 | ( | volatile int32_t * | dest | ) |
Increments the given 32-bit signed integer by one atomically.
dest | The target value to increment to. |
fpl_platform_api int64_t fplAtomicIncrementS64 | ( | volatile int64_t * | dest | ) |
Increments the given 64-bit signed integer by one atomically.
dest | The target value to increment to. |
fpl_common_api size_t fplAtomicIncrementSize | ( | volatile size_t * | dest | ) |
Increments the given size by one atomically.
dest | The target value to increment to. |
fpl_platform_api uint32_t fplAtomicIncrementU32 | ( | volatile uint32_t * | dest | ) |
Increments the given 32-bit unsigned integer by one atomically.
dest | The target value to increment to. |
fpl_platform_api uint64_t fplAtomicIncrementU64 | ( | volatile uint64_t * | dest | ) |
Increments the given 64-bit unsigned integer by one atomically.
dest | The target value to increment to. |
fpl_common_api bool fplAtomicIsCompareAndSwapPtr | ( | volatile void ** | dest, |
const void * | comparand, | ||
const void * | exchange | ||
) |
Compares a pointer with a comparand and swaps it when comparand matches the destination and returns a bool indicating the result.
dest | The target value to write into |
comparand | The value to compare with |
exchange | The value to exchange with |
fpl_platform_api bool fplAtomicIsCompareAndSwapS32 | ( | volatile int32_t * | dest, |
const int32_t | comparand, | ||
const int32_t | exchange | ||
) |
Compares a 32-bit signed integer with a comparand and swaps it when comparand matches the destination and returns a bool indicating the result.
dest | The target value to write into |
comparand | The value to compare with |
exchange | The value to exchange with |
fpl_platform_api bool fplAtomicIsCompareAndSwapS64 | ( | volatile int64_t * | dest, |
const int64_t | comparand, | ||
const int64_t | exchange | ||
) |
Compares a 64-bit signed integer with a comparand and swaps it when comparand matches the destination and returns a bool indicating the result.
dest | The target value to write into |
comparand | The value to compare with |
exchange | The value to exchange with |
fpl_common_api bool fplAtomicIsCompareAndSwapSize | ( | volatile size_t * | dest, |
const size_t | comparand, | ||
const size_t | exchange | ||
) |
Compares a size with a comparand and swaps it when comparand matches the destination and returns a bool indicating the result.
dest | The target value to write into |
comparand | The value to compare with |
exchange | The value to exchange with |
fpl_platform_api bool fplAtomicIsCompareAndSwapU32 | ( | volatile uint32_t * | dest, |
const uint32_t | comparand, | ||
const uint32_t | exchange | ||
) |
Compares a 32-bit unsigned integer with a comparand and swaps it when comparand matches the destination and returns a bool indicating the result.
dest | The target value to write into |
comparand | The value to compare with |
exchange | The value to exchange with |
fpl_platform_api bool fplAtomicIsCompareAndSwapU64 | ( | volatile uint64_t * | dest, |
const uint64_t | comparand, | ||
const uint64_t | exchange | ||
) |
Compares a 64-bit unsigned integer with a comparand and swaps it when comparand matches the destination and returns a bool indicating the result.
dest | The target value to write into |
comparand | The value to compare with |
exchange | The value to exchange with |
fpl_common_api void * fplAtomicLoadPtr | ( | volatile void ** | source | ) |
Loads the pointer value atomically and returns the value.
source | The source value to read from |
fpl_platform_api int32_t fplAtomicLoadS32 | ( | volatile int32_t * | source | ) |
Loads the 32-bit signed value atomically and returns the value.
source | The source value to read from |
fpl_platform_api int64_t fplAtomicLoadS64 | ( | volatile int64_t * | source | ) |
Loads the 64-bit signed value atomically and returns the value.
source | The source value to read from |
fpl_common_api size_t fplAtomicLoadSize | ( | volatile size_t * | source | ) |
Loads the size value atomically and returns the value.
source | The source value to read from |
fpl_platform_api uint32_t fplAtomicLoadU32 | ( | volatile uint32_t * | source | ) |
Loads the 32-bit unsigned value atomically and returns the value.
source | The source value to read from |
fpl_platform_api uint64_t fplAtomicLoadU64 | ( | volatile uint64_t * | source | ) |
Loads the 64-bit unsigned value atomically and returns the value.
source | The source value to read from |
fpl_platform_api void fplAtomicReadFence | ( | ) |
Inserts a memory read fence/barrier.
fpl_platform_api void fplAtomicReadWriteFence | ( | ) |
Inserts a memory read and write fence/barrier.
fpl_common_api void fplAtomicStorePtr | ( | volatile void ** | dest, |
const void * | value | ||
) |
Overwrites the pointer value atomically.
dest | The destination to write to |
value | The value to exchange with |
fpl_platform_api void fplAtomicStoreS32 | ( | volatile int32_t * | dest, |
const int32_t | value | ||
) |
Overwrites the 32-bit signed value atomically.
dest | The destination to write to |
value | The value to exchange with |
fpl_platform_api void fplAtomicStoreS64 | ( | volatile int64_t * | dest, |
const int64_t | value | ||
) |
Overwrites the 64-bit signed value atomically.
dest | The destination to write to |
value | The value to exchange with |
fpl_common_api void fplAtomicStoreSize | ( | volatile size_t * | dest, |
const size_t | value | ||
) |
Overwrites the size value atomically.
dest | The destination to write to |
value | The value to exchange with |
fpl_platform_api void fplAtomicStoreU32 | ( | volatile uint32_t * | dest, |
const uint32_t | value | ||
) |
Overwrites the 32-bit unsigned value atomically.
dest | The destination to write to |
value | The value to exchange with |
fpl_platform_api void fplAtomicStoreU64 | ( | volatile uint64_t * | dest, |
const uint64_t | value | ||
) |
Overwrites the 64-bit unsigned value atomically.
dest | The destination to write to |
value | The value to exchange with |
fpl_platform_api void fplAtomicWriteFence | ( | ) |
Inserts a memory write fence/barrier.