Yeppp!
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Functions
Swap/exchange (atomic read-write)

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...
 

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.