spin_lock_check has different signatures

Daniel Schaefer git at danielschaefer.me
Wed May 12 12:07:12 BST 2021


Hi,

spin_lock_check has different signatures in the C and in the H file.

See lib/sbi/riscv_locks.c

bool spin_lock_check(spinlock_t *lock)

and include/sbi/riscv_locks.h

int spin_lock_check(spinlock_t *lock);

Some related functions also seem to return a value that should be boolean but are not.
Especially spin_lock_unlocked returns an int and is used as return value for spin_lock_check.

So spin_lock_check and spin_lock_unlocked should return bool.
spin_trylock probably also.

Cheers,
Daniel



More information about the opensbi mailing list