diff options
Diffstat (limited to 'include/sbi/riscv_locks.h')
-rw-r--r-- | include/sbi/riscv_locks.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/include/sbi/riscv_locks.h b/include/sbi/riscv_locks.h index 4476319..55da7c0 100644 --- a/include/sbi/riscv_locks.h +++ b/include/sbi/riscv_locks.h @@ -14,13 +14,14 @@ typedef struct { volatile long lock; } spinlock_t; -#define __RISCV_SPIN_UNLOCKED 0 +#define __RISCV_SPIN_UNLOCKED 0 -#define SPIN_LOCK_INIT(_lptr) \ - (_lptr)->lock = __RISCV_SPIN_UNLOCKED +#define SPIN_LOCK_INIT(_lptr) (_lptr)->lock = __RISCV_SPIN_UNLOCKED -#define SPIN_LOCK_INITIALIZER \ - { .lock = __RISCV_SPIN_UNLOCKED, } +#define SPIN_LOCK_INITIALIZER \ + { \ + .lock = __RISCV_SPIN_UNLOCKED, \ + } int spin_lock_check(spinlock_t *lock); |