1 // RUN: %clang_analyze_cc1 -analyzer-checker=alpha.fuchsia.Lock -verify %s
2 // expected-no-diagnostics
3 typedef int spin_lock_t
;
5 void spin_lock(spin_lock_t
*lock
);
7 int spin_trylock(spin_lock_t
*lock
) {
12 void spin_unlock(spin_lock_t
*lock
);
16 if (spin_trylock(&mtx
) == 0)