diff options
Diffstat (limited to 'include/linux/smp_lock.h')
-rw-r--r-- | include/linux/smp_lock.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/smp_lock.h b/include/linux/smp_lock.h index aab3a4cff4e1..813be59bf345 100644 --- a/include/linux/smp_lock.h +++ b/include/linux/smp_lock.h | |||
@@ -27,11 +27,24 @@ static inline int reacquire_kernel_lock(struct task_struct *task) | |||
27 | extern void __lockfunc lock_kernel(void) __acquires(kernel_lock); | 27 | extern void __lockfunc lock_kernel(void) __acquires(kernel_lock); |
28 | extern void __lockfunc unlock_kernel(void) __releases(kernel_lock); | 28 | extern void __lockfunc unlock_kernel(void) __releases(kernel_lock); |
29 | 29 | ||
30 | /* | ||
31 | * Various legacy drivers don't really need the BKL in a specific | ||
32 | * function, but they *do* need to know that the BKL became available. | ||
33 | * This function just avoids wrapping a bunch of lock/unlock pairs | ||
34 | * around code which doesn't really need it. | ||
35 | */ | ||
36 | static inline void cycle_kernel_lock(void) | ||
37 | { | ||
38 | lock_kernel(); | ||
39 | unlock_kernel(); | ||
40 | } | ||
41 | |||
30 | #else | 42 | #else |
31 | 43 | ||
32 | #define lock_kernel() do { } while(0) | 44 | #define lock_kernel() do { } while(0) |
33 | #define unlock_kernel() do { } while(0) | 45 | #define unlock_kernel() do { } while(0) |
34 | #define release_kernel_lock(task) do { } while(0) | 46 | #define release_kernel_lock(task) do { } while(0) |
47 | #define cycle_kernel_lock() do { } while(0) | ||
35 | #define reacquire_kernel_lock(task) 0 | 48 | #define reacquire_kernel_lock(task) 0 |
36 | #define kernel_locked() 1 | 49 | #define kernel_locked() 1 |
37 | 50 | ||