Hold on to your braces!
This introduces the use of clang-tidy for static analysis and linting.
We start by ensuring that we use braces everywhere to reduce the risk of
programmer error caused by the misuse of scope.
Change-Id: I8aba449e6ef8405192d04aff5ed827f97e458d3d
diff --git a/inc/spinlock.h b/inc/spinlock.h
index dca3efb..1061fb3 100644
--- a/inc/spinlock.h
+++ b/inc/spinlock.h
@@ -19,8 +19,9 @@
static inline void sl_lock(struct spinlock *l)
{
- while (atomic_flag_test_and_set_explicit(&l->v, memory_order_acquire))
- ;
+ while (atomic_flag_test_and_set_explicit(&l->v, memory_order_acquire)) {
+ /* do nothing */
+ }
}
static inline void sl_unlock(struct spinlock *l)