Yeppp!
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Functions
yepAtomic.h: atomic operations.

Functions

enum YepStatus yepAtomic_Swap_Relaxed_S32uS32u_S32u (volatile Yep32u *value, Yep32u newValue, Yep32u *oldValue)
 Atomically reads the old value of the variable and replaces it with a new value. The memory state is not synchronized, and changes made by other cores to other variables are not guranteed to be visible to the local thread. More...
 
enum YepStatus yepAtomic_Swap_Acquire_S32uS32u_S32u (volatile Yep32u *value, Yep32u newValue, Yep32u *oldValue)
 Atomically reads the old value of the variable and replaces it with a new value. The memory state is synchronized after the exchange operation. More...
 
enum YepStatus yepAtomic_Swap_Release_S32uS32u_S32u (volatile Yep32u *value, Yep32u newValue, Yep32u *oldValue)
 Atomically reads the old value of the variable and replaces it with a new value. The memory state is synchronized before the exchange operation. More...
 
enum YepStatus yepAtomic_Swap_Ordered_S32uS32u_S32u (volatile Yep32u *value, Yep32u newValue, Yep32u *oldValue)
 Atomically reads the old value of the variable and replaces it with a new value. The memory state is synchronized both before and after the exchange operation. More...
 
enum YepStatus yepAtomic_CompareAndSwap_Relaxed_S32uS32uS32u (volatile Yep32u *value, Yep32u newValue, Yep32u oldValue)
 Atomically reads the value of the variable and, if it equals the expected value, replaces it with the old value. The memory state is not synchronized, and changes made by other cores to other variables are not guranteed to be visible to the local thread. More...
 
enum YepStatus yepAtomic_CompareAndSwap_Acquire_S32uS32uS32u (volatile Yep32u *value, Yep32u newValue, Yep32u oldValue)
 Atomically reads the value of the variable and, if it equals the expected value, replaces it with the old value. The memory state is synchronized after the compare-and-swap operation. More...
 
enum YepStatus yepAtomic_CompareAndSwap_Release_S32uS32uS32u (volatile Yep32u *value, Yep32u newValue, Yep32u oldValue)
 Atomically reads the value of the variable and, if it equals the expected value, replaces it with the old value. The memory state is synchronized before the compare-and-swap operation. More...
 
enum YepStatus yepAtomic_CompareAndSwap_Ordered_S32uS32uS32u (volatile Yep32u *value, Yep32u newValue, Yep32u oldValue)
 Atomically reads the value of the variable and, if it equals the expected value, replaces it with the old value. The memory state is synchronized both before and after the compare-and-swap operation. More...
 

Detailed Description

Function Documentation

enum YepStatus yepAtomic_Swap_Relaxed_S32uS32u_S32u ( volatile Yep32u value,
Yep32u  newValue,
Yep32u oldValue 
)

Atomically reads the old value of the variable and replaces it with a new value. The memory state is not synchronized, and changes made by other cores to other variables are not guranteed to be visible to the local thread.

Parameters
valuePointer to a synchronization variable to be atomically swapped.
newValueThe new value to be written to the synchronization variable.
oldValuePointer to the variable to receive the old value of the synchronization variable.
Return values
YepStatusOkThe atomic swap operation successfully finished.
YepStatusNullPointerEither value or oldValue pointer is null.
YepStatusMisalignedPointerEither value or oldValue pointer is not naturally aligned.
enum YepStatus yepAtomic_Swap_Acquire_S32uS32u_S32u ( volatile Yep32u value,
Yep32u  newValue,
Yep32u oldValue 
)

Atomically reads the old value of the variable and replaces it with a new value. The memory state is synchronized after the exchange operation.

Parameters
valuePointer to a synchronization variable to be atomically swapped.
newValueThe new value to be written to the synchronization variable.
oldValuePointer to the variable to receive the old value of the synchronization variable.
Return values
YepStatusOkThe atomic swap operation successfully finished.
YepStatusNullPointerEither value or oldValue pointer is null.
YepStatusMisalignedPointerEither value or oldValue pointer is not naturally aligned.
enum YepStatus yepAtomic_Swap_Release_S32uS32u_S32u ( volatile Yep32u value,
Yep32u  newValue,
Yep32u oldValue 
)

Atomically reads the old value of the variable and replaces it with a new value. The memory state is synchronized before the exchange operation.

Parameters
valuePointer to a synchronization variable to be atomically swapped.
newValueThe new value to be written to the synchronization variable.
oldValuePointer to the variable to receive the old value of the synchronization variable.
Return values
YepStatusOkThe atomic swap operation successfully finished.
YepStatusNullPointerEither value or oldValue pointer is null.
YepStatusMisalignedPointerEither value or oldValue pointer is not naturally aligned.
enum YepStatus yepAtomic_Swap_Ordered_S32uS32u_S32u ( volatile Yep32u value,
Yep32u  newValue,
Yep32u oldValue 
)

Atomically reads the old value of the variable and replaces it with a new value. The memory state is synchronized both before and after the exchange operation.

Parameters
valuePointer to a synchronization variable to be atomically swapped.
newValueThe new value to be written to the synchronization variable.
oldValuePointer to the variable to receive the old value of the synchronization variable.
Return values
YepStatusOkThe atomic swap operation successfully finished.
YepStatusNullPointerEither value or oldValue pointer is null.
YepStatusMisalignedPointerEither value or oldValue pointer is not naturally aligned.
enum YepStatus yepAtomic_CompareAndSwap_Relaxed_S32uS32uS32u ( volatile Yep32u value,
Yep32u  newValue,
Yep32u  oldValue 
)

Atomically reads the value of the variable and, if it equals the expected value, replaces it with the old value. The memory state is not synchronized, and changes made by other cores to other variables are not guranteed to be visible to the local thread.

Parameters
valuePointer to a synchronization variable to be atomically compared and swapped.
newValueThe new value to be written to the value variable if comparison is successful.
oldValueThe expected value of the value variable.
Return values
YepStatusOkThe newValue was successfully written to the value variable.
YepStatusInvalidStateThe operation failed because the value is different than the specified oldValue.
YepStatusNullPointerThe value pointer is null.
YepStatusMisalignedPointerThe value pointer is not naturally aligned.
enum YepStatus yepAtomic_CompareAndSwap_Acquire_S32uS32uS32u ( volatile Yep32u value,
Yep32u  newValue,
Yep32u  oldValue 
)

Atomically reads the value of the variable and, if it equals the expected value, replaces it with the old value. The memory state is synchronized after the compare-and-swap operation.

Parameters
valuePointer to a synchronization variable to be atomically compared and swapped.
newValueThe new value to be written to the value variable if comparison is successful.
oldValueThe expected value of the value variable.
Return values
YepStatusOkThe newValue was successfully written to the value variable.
YepStatusInvalidStateThe operation failed because the value is different than the specified oldValue.
YepStatusNullPointerThe value pointer is null.
YepStatusMisalignedPointerThe value pointer is not naturally aligned.
enum YepStatus yepAtomic_CompareAndSwap_Release_S32uS32uS32u ( volatile Yep32u value,
Yep32u  newValue,
Yep32u  oldValue 
)

Atomically reads the value of the variable and, if it equals the expected value, replaces it with the old value. The memory state is synchronized before the compare-and-swap operation.

Parameters
valuePointer to a synchronization variable to be atomically compared and swapped.
newValueThe new value to be written to the value variable if comparison is successful.
oldValueThe expected value of the value variable.
Return values
YepStatusOkThe newValue was successfully written to the value variable.
YepStatusInvalidStateThe operation failed because the value is different than the specified oldValue.
YepStatusNullPointerThe value pointer is null.
YepStatusMisalignedPointerThe value pointer is not naturally aligned.
enum YepStatus yepAtomic_CompareAndSwap_Ordered_S32uS32uS32u ( volatile Yep32u value,
Yep32u  newValue,
Yep32u  oldValue 
)

Atomically reads the value of the variable and, if it equals the expected value, replaces it with the old value. The memory state is synchronized both before and after the compare-and-swap operation.

Parameters
valuePointer to a synchronization variable to be atomically compared and swapped.
newValueThe new value to be written to the value variable if comparison is successful.
oldValueThe expected value of the value variable.
Return values
YepStatusOkThe newValue was successfully written to the value variable.
YepStatusInvalidStateThe operation failed because the value is different than the specified oldValue.
YepStatusNullPointerThe value pointer is null.
YepStatusMisalignedPointerThe value pointer is not naturally aligned.