Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 139043
b: refs/heads/master
c: cf2ad4d
h: refs/heads/master
i:
  139041: fc26da9
  139039: 6b126fa
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Feb 14, 2009
1 parent b46f8c7 commit 5a1c27c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9d3651a23dc1f7ed7d207f9118459d3a73d485a7
refs/heads/master: cf2ad4d13c4ac6366c730fcf6c6be00db12fb75f
20 changes: 5 additions & 15 deletions trunk/kernel/lockdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -2099,14 +2099,6 @@ enum mark_type {
#undef LOCKDEP_STATE
};

#define MARK_HELD_CASE(__STATE) \
case __STATE: \
if (hlock->read) \
usage_bit = LOCK_ENABLED_##__STATE##_READ; \
else \
usage_bit = LOCK_ENABLED_##__STATE; \
break;

/*
* Mark all held locks with a usage bit:
*/
Expand All @@ -2120,13 +2112,11 @@ mark_held_locks(struct task_struct *curr, enum mark_type mark)
for (i = 0; i < curr->lockdep_depth; i++) {
hlock = curr->held_locks + i;

switch (mark) {
#define LOCKDEP_STATE(__STATE) MARK_HELD_CASE(__STATE)
#include "lockdep_states.h"
#undef LOCKDEP_STATE
default:
BUG();
}
usage_bit = 2 + (mark << 2); /* ENABLED */
if (hlock->read)
usage_bit += 1; /* READ */

BUG_ON(usage_bit >= LOCK_USAGE_STATES);

if (!mark_lock(curr, hlock, usage_bit))
return 0;
Expand Down

0 comments on commit 5a1c27c

Please sign in to comment.