spinlock: Change function signature to return bool
Functions z_spin_lock_valid and z_spin_unlock_valid are essentially boolean functions, just change their signature to return a bool instead of an integer. MISRA-C rule 10.1 Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
ce696e9aa2
commit
625ac2e79f
2 changed files with 9 additions and 8 deletions
|
@ -35,9 +35,10 @@ static inline void z_arch_irq_unlock(int key)
|
|||
#if (CONFIG_FLASH_SIZE == 0) || (CONFIG_FLASH_SIZE > 32)
|
||||
#if defined(CONFIG_ASSERT) && (CONFIG_MP_NUM_CPUS < 4)
|
||||
#include <misc/__assert.h>
|
||||
#include <stdbool.h>
|
||||
struct k_spinlock;
|
||||
int z_spin_lock_valid(struct k_spinlock *l);
|
||||
int z_spin_unlock_valid(struct k_spinlock *l);
|
||||
bool z_spin_lock_valid(struct k_spinlock *l);
|
||||
bool z_spin_unlock_valid(struct k_spinlock *l);
|
||||
void z_spin_lock_set_owner(struct k_spinlock *l);
|
||||
#define SPIN_VALIDATE
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue