Skip to content

Commit

Permalink
fixup! [Docs] Improve and unify Doxygen comments, part 1
Browse files Browse the repository at this point in the history
Signed-off-by: Michał Kowalczyk <mkow@invisiblethingslab.com>
  • Loading branch information
mkow committed Feb 24, 2022
1 parent 00ee862 commit f93ec8e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/include/spinlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ static inline void spinlock_init(spinlock_t* lock) {
/*!
* \brief Try to acquire spinlock.
*
* \returns 0 if acquiring the lock succeeded, 1 if it was already taken.
* \returns 0 if acquiring the lock succeeded, -1 if it was already taken.
*/
static inline int spinlock_trylock(spinlock_t* lock) {
if (__atomic_exchange_n(&lock->lock, SPINLOCK_LOCKED, __ATOMIC_ACQUIRE) == SPINLOCK_UNLOCKED) {
debug_spinlock_take_ownership(lock);
return 0;
}
return 1;
return -1;
}

/*!
Expand Down

0 comments on commit f93ec8e

Please sign in to comment.