Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100321
b: refs/heads/master
c: 0b28067
h: refs/heads/master
i:
  100319: ecf9cbe
v: v3
  • Loading branch information
Jonathan Corbet committed Jun 20, 2008
1 parent 187ff08 commit ebf14c9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6606470dd1d628878383c96d10b52a77986ddac7
refs/heads/master: 0b2806768899dba5967bcd4a3b93eaed9a1dc4f3
13 changes: 13 additions & 0 deletions trunk/include/linux/smp_lock.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,24 @@ static inline int reacquire_kernel_lock(struct task_struct *task)
extern void __lockfunc lock_kernel(void) __acquires(kernel_lock);
extern void __lockfunc unlock_kernel(void) __releases(kernel_lock);

/*
* Various legacy drivers don't really need the BKL in a specific
* function, but they *do* need to know that the BKL became available.
* This function just avoids wrapping a bunch of lock/unlock pairs
* around code which doesn't really need it.
*/
static inline void cycle_kernel_lock(void)
{
lock_kernel();
unlock_kernel();
}

#else

#define lock_kernel() do { } while(0)
#define unlock_kernel() do { } while(0)
#define release_kernel_lock(task) do { } while(0)
#define cycle_kernel_lock() do { } while(0)
#define reacquire_kernel_lock(task) 0
#define kernel_locked() 1

Expand Down

0 comments on commit ebf14c9

Please sign in to comment.