diff options
Diffstat (limited to 'include/linux/smp_lock.h')
-rw-r--r-- | include/linux/smp_lock.h | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/include/linux/smp_lock.h b/include/linux/smp_lock.h index 813be59bf345..2ea1dd1ba21c 100644 --- a/include/linux/smp_lock.h +++ b/include/linux/smp_lock.h | |||
@@ -24,8 +24,21 @@ static inline int reacquire_kernel_lock(struct task_struct *task) | |||
24 | return 0; | 24 | return 0; |
25 | } | 25 | } |
26 | 26 | ||
27 | extern void __lockfunc lock_kernel(void) __acquires(kernel_lock); | 27 | extern void __lockfunc |
28 | extern void __lockfunc unlock_kernel(void) __releases(kernel_lock); | 28 | _lock_kernel(const char *func, const char *file, int line) |
29 | __acquires(kernel_lock); | ||
30 | |||
31 | extern void __lockfunc | ||
32 | _unlock_kernel(const char *func, const char *file, int line) | ||
33 | __releases(kernel_lock); | ||
34 | |||
35 | #define lock_kernel() do { \ | ||
36 | _lock_kernel(__func__, __FILE__, __LINE__); \ | ||
37 | } while (0) | ||
38 | |||
39 | #define unlock_kernel() do { \ | ||
40 | _unlock_kernel(__func__, __FILE__, __LINE__); \ | ||
41 | } while (0) | ||
29 | 42 | ||
30 | /* | 43 | /* |
31 | * Various legacy drivers don't really need the BKL in a specific | 44 | * Various legacy drivers don't really need the BKL in a specific |
@@ -41,8 +54,8 @@ static inline void cycle_kernel_lock(void) | |||
41 | 54 | ||
42 | #else | 55 | #else |
43 | 56 | ||
44 | #define lock_kernel() do { } while(0) | 57 | #define lock_kernel() |
45 | #define unlock_kernel() do { } while(0) | 58 | #define unlock_kernel() |
46 | #define release_kernel_lock(task) do { } while(0) | 59 | #define release_kernel_lock(task) do { } while(0) |
47 | #define cycle_kernel_lock() do { } while(0) | 60 | #define cycle_kernel_lock() do { } while(0) |
48 | #define reacquire_kernel_lock(task) 0 | 61 | #define reacquire_kernel_lock(task) 0 |