diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2008-08-11 03:30:21 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-08-11 03:30:21 -0400 |
commit | 64aa348edc617dea17bbd01ddee4e47886d5ec8c (patch) | |
tree | 002b5fa796aff225d0cb9d0c32bb3ba96da6eaaf /include | |
parent | 5e710e37bde120bb069f691bee68e69ef4393173 (diff) |
lockdep: lock_set_subclass - reset a held lock's subclass
this can be used to reset a held lock's subclass, for arbitrary-depth
iterated data structures such as trees or lists which have per-node
locks.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/lockdep.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index 1bfdc30bb0af..f270ce1582ff 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h | |||
@@ -300,6 +300,9 @@ extern void lock_acquire(struct lockdep_map *lock, unsigned int subclass, | |||
300 | extern void lock_release(struct lockdep_map *lock, int nested, | 300 | extern void lock_release(struct lockdep_map *lock, int nested, |
301 | unsigned long ip); | 301 | unsigned long ip); |
302 | 302 | ||
303 | extern void lock_set_subclass(struct lockdep_map *lock, unsigned int subclass, | ||
304 | unsigned long ip); | ||
305 | |||
303 | # define INIT_LOCKDEP .lockdep_recursion = 0, | 306 | # define INIT_LOCKDEP .lockdep_recursion = 0, |
304 | 307 | ||
305 | #define lockdep_depth(tsk) (debug_locks ? (tsk)->lockdep_depth : 0) | 308 | #define lockdep_depth(tsk) (debug_locks ? (tsk)->lockdep_depth : 0) |
@@ -316,6 +319,7 @@ static inline void lockdep_on(void) | |||
316 | 319 | ||
317 | # define lock_acquire(l, s, t, r, c, i) do { } while (0) | 320 | # define lock_acquire(l, s, t, r, c, i) do { } while (0) |
318 | # define lock_release(l, n, i) do { } while (0) | 321 | # define lock_release(l, n, i) do { } while (0) |
322 | # define lock_set_subclass(l, s, i) do { } while (0) | ||
319 | # define lockdep_init() do { } while (0) | 323 | # define lockdep_init() do { } while (0) |
320 | # define lockdep_info() do { } while (0) | 324 | # define lockdep_info() do { } while (0) |
321 | # define lockdep_init_map(lock, name, key, sub) do { (void)(key); } while (0) | 325 | # define lockdep_init_map(lock, name, key, sub) do { (void)(key); } while (0) |