RTEMS
|
Atomic Operations CPU API. More...
Functions | |
static void | _CPU_atomic_Fence (CPU_atomic_Order order) |
Sets up a cpu fence. More... | |
static void | _CPU_atomic_Init_uint (CPU_atomic_Uint *obj, unsigned int desired) |
Initializes Uint. More... | |
static void | _CPU_atomic_Init_ulong (CPU_atomic_Ulong *obj, unsigned long desired) |
Initializes Ulong. More... | |
static void | _CPU_atomic_Init_uintptr (CPU_atomic_Uintptr *obj, uintptr_t desired) |
Initializes Uintptr. More... | |
static unsigned int | _CPU_atomic_Load_uint (const CPU_atomic_Uint *obj, CPU_atomic_Order order) |
Loads value of Uint considering the order. More... | |
static unsigned long | _CPU_atomic_Load_ulong (const CPU_atomic_Ulong *obj, CPU_atomic_Order order) |
Loads value of Ulong considering the order. More... | |
static uintptr_t | _CPU_atomic_Load_uintptr (const CPU_atomic_Uintptr *obj, CPU_atomic_Order order) |
Loads value of Uintptr considering the order. More... | |
static void | _CPU_atomic_Store_uint (CPU_atomic_Uint *obj, unsigned int desired, CPU_atomic_Order order) |
Stores a value to Uint considering the order. More... | |
static void | _CPU_atomic_Store_ulong (CPU_atomic_Ulong *obj, unsigned long desired, CPU_atomic_Order order) |
Stores a value to Ulong considering the order. More... | |
static void | _CPU_atomic_Store_uintptr (CPU_atomic_Uintptr *obj, uintptr_t desired, CPU_atomic_Order order) |
Stores a value to Uintptr considering the order. More... | |
static unsigned int | _CPU_atomic_Fetch_add_uint (CPU_atomic_Uint *obj, unsigned int arg, CPU_atomic_Order order) |
Fetches current value of Uint and adds a value to the stored value. More... | |
static unsigned long | _CPU_atomic_Fetch_add_ulong (CPU_atomic_Ulong *obj, unsigned long arg, CPU_atomic_Order order) |
Fetches current value of Ulong and adds a value to the stored value. More... | |
static uintptr_t | _CPU_atomic_Fetch_add_uintptr (CPU_atomic_Uintptr *obj, uintptr_t arg, CPU_atomic_Order order) |
Fetches current value of Uintptr and adds a value to the stored value. More... | |
static unsigned int | _CPU_atomic_Fetch_sub_uint (CPU_atomic_Uint *obj, unsigned int arg, CPU_atomic_Order order) |
Fetches current value of Uint and subtracts a value from the stored value. More... | |
static unsigned long | _CPU_atomic_Fetch_sub_ulong (CPU_atomic_Ulong *obj, unsigned long arg, CPU_atomic_Order order) |
Fetches current value of Ulong and subtracts a value from the stored value. More... | |
static uintptr_t | _CPU_atomic_Fetch_sub_uintptr (CPU_atomic_Uintptr *obj, uintptr_t arg, CPU_atomic_Order order) |
Fetches current value of Uintptr and subtracts a value from the stored value. More... | |
static unsigned int | _CPU_atomic_Fetch_or_uint (CPU_atomic_Uint *obj, unsigned int arg, CPU_atomic_Order order) |
Fetches current value of Uint and ORs a value with the stored value. More... | |
static unsigned long | _CPU_atomic_Fetch_or_ulong (CPU_atomic_Ulong *obj, unsigned long arg, CPU_atomic_Order order) |
Fetches current value of Ulong and ORs a value with the stored value. More... | |
static uintptr_t | _CPU_atomic_Fetch_or_uintptr (CPU_atomic_Uintptr *obj, uintptr_t arg, CPU_atomic_Order order) |
Fetches current value of Uintptr and ORs a value with the stored value. More... | |
static unsigned int | _CPU_atomic_Fetch_and_uint (CPU_atomic_Uint *obj, unsigned int arg, CPU_atomic_Order order) |
Fetches current value of Uint and ANDs a value with the stored value. More... | |
static unsigned long | _CPU_atomic_Fetch_and_ulong (CPU_atomic_Ulong *obj, unsigned long arg, CPU_atomic_Order order) |
Fetches current value of Ulong and ANDs a value with the stored value. More... | |
static uintptr_t | _CPU_atomic_Fetch_and_uintptr (CPU_atomic_Uintptr *obj, uintptr_t arg, CPU_atomic_Order order) |
Fetches current value of Uintptr and ANDs a value with the stored value. More... | |
static unsigned int | _CPU_atomic_Exchange_uint (CPU_atomic_Uint *obj, unsigned int desired, CPU_atomic_Order order) |
Fetches current value of Uint and sets its value. More... | |
static unsigned long | _CPU_atomic_Exchange_ulong (CPU_atomic_Ulong *obj, unsigned long desired, CPU_atomic_Order order) |
Fetches current value of Ulong and sets its value. More... | |
static uintptr_t | _CPU_atomic_Exchange_uintptr (CPU_atomic_Uintptr *obj, uintptr_t desired, CPU_atomic_Order order) |
Fetches current value of Uintptr and sets its value. More... | |
static bool | _CPU_atomic_Compare_exchange_uint (CPU_atomic_Uint *obj, unsigned int *expected, unsigned int desired, CPU_atomic_Order succ, CPU_atomic_Order fail) |
Checks if value of Uint is as expected. More... | |
static bool | _CPU_atomic_Compare_exchange_ulong (CPU_atomic_Ulong *obj, unsigned long *expected, unsigned long desired, CPU_atomic_Order succ, CPU_atomic_Order fail) |
Checks if value of Ulong is as expected. More... | |
static bool | _CPU_atomic_Compare_exchange_uintptr (CPU_atomic_Uintptr *obj, uintptr_t *expected, uintptr_t desired, CPU_atomic_Order succ, CPU_atomic_Order fail) |
Checks if value of Uintptr is as expected. More... | |
static void | _CPU_atomic_Flag_clear (CPU_atomic_Flag *obj, CPU_atomic_Order order) |
Clears the atomic flag. More... | |
static bool | _CPU_atomic_Flag_test_and_set (CPU_atomic_Flag *obj, CPU_atomic_Order order) |
Returns current flag state and sets it. More... | |
Atomic Operations CPU API.
|
inlinestatic |
Checks if value of Uint is as expected.
This method checks if the value of obj is equal to the value of expected. If this is the case, the value of obj is changed to desired. Otherwise, the value of obj is changed to expected.
[in,out] | obj | The CPU atomic Uint to operate upon. |
[in,out] | expected | The expected value of obj. If obj has a different value, expected is changed to the actual value of obj. |
desired | The new value of obj if the old value of obj was as expected. | |
succ | The order if it is successful. | |
fail | The order if it fails. |
true | The old value of obj was as expected. |
false | The old value of obj was not as expected. |
Definition at line 799 of file cpustdatomic.h.
|
inlinestatic |
Checks if value of Uintptr is as expected.
This method checks if the value of obj is equal to the value of expected. If this is the case, the value of obj is changed to desired. Otherwise, the value of obj is changed to expected.
[in,out] | obj | The CPU atomic Uintptr to operate upon. |
[in,out] | expected | The expected value of obj. If obj has a different value, expected is changed to the actual value of obj. |
desired | The new value of obj if the old value of obj was as expected. | |
succ | The order if it is successful. | |
fail | The order if it fails. |
true | The old value of obj was as expected. |
false | The old value of obj was not as expected. |
Definition at line 887 of file cpustdatomic.h.
|
inlinestatic |
Checks if value of Ulong is as expected.
This method checks if the value of obj is equal to the value of expected. If this is the case, the value of obj is changed to desired. Otherwise, the value of obj is changed to expected.
[in,out] | obj | The CPU atomic Ulong to operate upon. |
[in,out] | expected | The expected value of obj. If obj has a different value, expected is changed to the actual value of obj. |
desired | The new value of obj if the old value of obj was as expected. | |
succ | The order if it is successful. | |
fail | The order if it fails. |
true | The old value of obj was as expected. |
false | The old value of obj was not as expected. |
Definition at line 843 of file cpustdatomic.h.
|
inlinestatic |
Fetches current value of Uint and sets its value.
[in,out] | obj | The CPU atomic Uint to get the value from and set the value to desired. |
arg | The value to set for obj. | |
order | The atomic order for the operation. |
Definition at line 704 of file cpustdatomic.h.
|
inlinestatic |
Fetches current value of Uintptr and sets its value.
[in,out] | obj | The CPU atomic Uintptr to get the value from and set the value to desired. |
arg | The value to set for obj. | |
order | The atomic order for the operation. |
Definition at line 762 of file cpustdatomic.h.
|
inlinestatic |
Fetches current value of Ulong and sets its value.
[in,out] | obj | The CPU atomic Ulong to get the value from and set the value to desired. |
arg | The value to set for obj. | |
order | The atomic order for the operation. |
Definition at line 733 of file cpustdatomic.h.
|
inlinestatic |
Sets up a cpu fence.
[out] | order | The order for the fence. |
Definition at line 149 of file cpustdatomic.h.
|
inlinestatic |
Fetches current value of Uint and adds a value to the stored value.
[in,out] | obj | The CPU atomic Uint to get the value from and add arg to. |
arg | The value to add to obj. | |
order | The atomic order for the operation. |
Definition at line 356 of file cpustdatomic.h.
|
inlinestatic |
Fetches current value of Uintptr and adds a value to the stored value.
[in,out] | obj | The CPU atomic Uintptr to get the value from and add arg to. |
arg | The value to add to obj. | |
order | The atomic order for the operation. |
Definition at line 414 of file cpustdatomic.h.
|
inlinestatic |
Fetches current value of Ulong and adds a value to the stored value.
[in,out] | obj | The CPU atomic Ulong to get the value from and add arg to. |
arg | The value to add to obj. | |
order | The atomic order for the operation. |
Definition at line 385 of file cpustdatomic.h.
|
inlinestatic |
Fetches current value of Uint and ANDs a value with the stored value.
[in,out] | obj | The CPU atomic Uint to get the value from and AND arg to. |
arg | The value to AND with obj. | |
order | The atomic order for the operation. |
Definition at line 617 of file cpustdatomic.h.
|
inlinestatic |
Fetches current value of Uintptr and ANDs a value with the stored value.
[in,out] | obj | The CPU atomic Uintptr to get the value from and AND arg to. |
arg | The value to AND with obj. | |
order | The atomic order for the operation. |
Definition at line 675 of file cpustdatomic.h.
|
inlinestatic |
Fetches current value of Ulong and ANDs a value with the stored value.
[in,out] | obj | The CPU atomic Ulong to get the value from and AND arg to. |
arg | The value to AND with obj. | |
order | The atomic order for the operation. |
Definition at line 646 of file cpustdatomic.h.
|
inlinestatic |
Fetches current value of Uint and ORs a value with the stored value.
[in,out] | obj | The CPU atomic Uint to get the value from and OR arg to. |
arg | The value to OR with obj. | |
order | The atomic order for the operation. |
Definition at line 530 of file cpustdatomic.h.
|
inlinestatic |
Fetches current value of Uintptr and ORs a value with the stored value.
[in,out] | obj | The CPU atomic Uintptr to get the value from and OR arg to. |
arg | The value to OR with obj. | |
order | The atomic order for the operation. |
Definition at line 588 of file cpustdatomic.h.
|
inlinestatic |
Fetches current value of Ulong and ORs a value with the stored value.
[in,out] | obj | The CPU atomic Ulong to get the value from and OR arg to. |
arg | The value to OR with obj. | |
order | The atomic order for the operation. |
Definition at line 559 of file cpustdatomic.h.
|
inlinestatic |
Fetches current value of Uint and subtracts a value from the stored value.
[in,out] | obj | The CPU atomic Uint to get the value from and subtract arg from. |
arg | The value to subtract from obj. | |
order | The atomic order for the operation. |
Definition at line 443 of file cpustdatomic.h.
|
inlinestatic |
Fetches current value of Uintptr and subtracts a value from the stored value.
[in,out] | obj | The CPU atomic Uintptr to get the value from and subtract arg from. |
arg | The value to subtract from obj. | |
order | The atomic order for the operation. |
Definition at line 501 of file cpustdatomic.h.
|
inlinestatic |
Fetches current value of Ulong and subtracts a value from the stored value.
[in,out] | obj | The CPU atomic Ulong to get the value from and subtract arg from. |
arg | The value to subtract from obj. | |
order | The atomic order for the operation. |
Definition at line 472 of file cpustdatomic.h.
|
inlinestatic |
Clears the atomic flag.
[out] | obj | The atomic flag to be cleared. |
order | The atomic order for the operation. |
Definition at line 920 of file cpustdatomic.h.
|
inlinestatic |
Returns current flag state and sets it.
[in,out] | obj | The atomic flag to be set. |
order | The atomic order for the operation. |
true | obj was set prior to this operation. |
false | obj was not set prior to this operation. |
Definition at line 941 of file cpustdatomic.h.
|
inlinestatic |
Initializes Uint.
[out] | obj | The CPU atomic Uint to initialize. |
desired | The desired value for obj. |
Definition at line 167 of file cpustdatomic.h.
|
inlinestatic |
Initializes Uintptr.
[out] | obj | The CPU atomic Uintptr to initialize. |
desired | The desired value for obj. |
Definition at line 201 of file cpustdatomic.h.
|
inlinestatic |
Initializes Ulong.
[out] | obj | The CPU atomic Ulong to initialize. |
desired | The desired value for obj. |
Definition at line 184 of file cpustdatomic.h.
|
inlinestatic |
Loads value of Uint considering the order.
obj | The CPU atomic Uint to get the value from. |
order | The atomic order for getting the value. |
Definition at line 220 of file cpustdatomic.h.
|
inlinestatic |
Loads value of Uintptr considering the order.
obj | The CPU atomic Uintptr to get the value from. |
order | The atomic order for getting the value. |
Definition at line 270 of file cpustdatomic.h.
|
inlinestatic |
Loads value of Ulong considering the order.
obj | The CPU atomic Ulong to get the value from. |
order | The atomic order for getting the value. |
Definition at line 245 of file cpustdatomic.h.
|
inlinestatic |
Stores a value to Uint considering the order.
[out] | obj | The CPU atomic Uint to store a value in. |
desired | The desired value for obj. | |
order | The atomic order for storing the value. |
Definition at line 294 of file cpustdatomic.h.
|
inlinestatic |
Stores a value to Uintptr considering the order.
[out] | obj | The CPU atomic Uintptr to store a value in. |
desired | The desired value for obj. | |
order | The atomic order for storing the value. |
Definition at line 334 of file cpustdatomic.h.
|
inlinestatic |
Stores a value to Ulong considering the order.
[out] | obj | The CPU atomic Ulong to store a value in. |
desired | The desired value for obj. | |
order | The atomic order for storing the value. |
Definition at line 314 of file cpustdatomic.h.