diff options
| author | Daniel Schaefer <[email protected]> | 2021-05-13 12:52:35 +0800 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2021-05-14 17:05:20 +0530 |
| commit | f90c4c2e0298a6a6e7ade87bf1b704a3a07aa7b9 (patch) | |
| tree | fa783638405899503e6bf169b88a1ea12906a63c /include | |
| parent | 26998f3d116992ae3fc6670c8f724bcc630d33fd (diff) | |
lib: sbi: Have spinlock checks return bool
spin_lock_check already returned bool in the source file but not in the
header. With some toolchains that causes an error, as it should.
Because it and related functions all essentially return a bool, we can
use this opportunity to change them.
Signed-off-by: Daniel Schaefer <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/sbi/riscv_locks.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/sbi/riscv_locks.h b/include/sbi/riscv_locks.h index 492935f5..38d9cbeb 100644 --- a/include/sbi/riscv_locks.h +++ b/include/sbi/riscv_locks.h @@ -34,9 +34,9 @@ typedef struct { #define DEFINE_SPIN_LOCK(x) \ spinlock_t SPIN_LOCK_INIT(x) -int spin_lock_check(spinlock_t *lock); +bool spin_lock_check(spinlock_t *lock); -int spin_trylock(spinlock_t *lock); +bool spin_trylock(spinlock_t *lock); void spin_lock(spinlock_t *lock); |
