1 /* SPDX-License-Identifier: BSD-2-Clause */
2 /*
3  * Copyright (c) 2018, Linaro Limited
4  */
5 #ifndef MUTEX_LOCKDEP_H
6 #define MUTEX_LOCKDEP_H
7 
8 #include <compiler.h>
9 #include <kernel/mutex.h>
10 
11 #ifdef CFG_LOCKDEP
12 
13 void mutex_lock_check(struct mutex *m);
14 
15 void mutex_trylock_check(struct mutex *m);
16 
17 void mutex_unlock_check(struct mutex *m);
18 
19 void mutex_destroy_check(struct mutex *m);
20 
21 #else
22 
mutex_lock_check(struct mutex * m __unused)23 static inline void mutex_lock_check(struct mutex *m __unused)
24 {}
25 
mutex_trylock_check(struct mutex * m __unused)26 static inline void mutex_trylock_check(struct mutex *m __unused)
27 {}
28 
mutex_unlock_check(struct mutex * m __unused)29 static inline void mutex_unlock_check(struct mutex *m __unused)
30 {}
31 
mutex_destroy_check(struct mutex * m __unused)32 static inline void mutex_destroy_check(struct mutex *m __unused)
33 {}
34 
35 #endif /* !CFG_LOCKDEP */
36 
37 #endif /* MUTEX_LOCKDEP_H */
38