kernel: atomic_*() functions rework
* No need for the atomically changed variables to be declared as volatile. * Drop support for atomically getting and setting unaligned data. * Introduce atomic_get_and_set[64]() which works the same as atomic_set[64]() used to. atomic_set[64]() does not return the previous value anymore.
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
typedef uint32_t bus_addr_t;
|
||||
typedef uint32_t bus_size_t;
|
||||
|
||||
#define atomic_readandclear_int(ptr) atomic_set((int32 *)(ptr), 0)
|
||||
#define atomic_readandclear_int(ptr) atomic_get_and_set((int32*)(ptr), 0)
|
||||
#define atomic_set_int(ptr, value) atomic_or((int32 *)(ptr), value)
|
||||
|
||||
#define mtx_lock mutex_lock
|
||||
|
||||
Reference in New Issue
Block a user