Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions zephyr/include/sof/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@

#include <sys/atomic.h>

#define atomic_read atomic_get
#define atomic_init atomic_set
/* Zephyr commit 174cb7f9f183 switched 'atomic_t' from 'int' to
* 'long'. As we don't support 64 bits, this should have made no
* difference but in reality it broke printk("%d / %ld",...) The no-op
* cast to 'long' below provides a transition by making it possible to
* compile SOF both before _and_ after the Zephyr switch.
*/
#define atomic_read(p) ((long)atomic_get(p))
#define atomic_init(p, v) atomic_set(p, v)

#endif