aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/debug_locks.h
diff options
context:
space:
mode:
authorEduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>2008-07-05 05:14:23 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-05 16:10:50 -0400
commitca31e146d5c2fe51498e619eb3a64782d02e310a (patch)
tree121916bb92004ca138fc8d8e436e68435c8d5de0 /include/linux/debug_locks.h
parent84df87b7ebdcbbc0f59df9526f4e63fda70647d3 (diff)
Move _RET_IP_ and _THIS_IP_ to include/linux/kernel.h
These two macros are useful beyond lock debugging. Moved definitions from include/linux/debug_locks.h to include/linux/kernel.h, so code that needs them does not have to include the former, which would have been a less intuitive choice of a header. Signed-off-by: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro> Acked-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/debug_locks.h')
-rw-r--r--include/linux/debug_locks.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/include/linux/debug_locks.h b/include/linux/debug_locks.h
index f4a5871767f5..4aaa4afb1cb9 100644
--- a/include/linux/debug_locks.h
+++ b/include/linux/debug_locks.h
@@ -1,6 +1,8 @@
1#ifndef __LINUX_DEBUG_LOCKING_H 1#ifndef __LINUX_DEBUG_LOCKING_H
2#define __LINUX_DEBUG_LOCKING_H 2#define __LINUX_DEBUG_LOCKING_H
3 3
4#include <linux/kernel.h>
5
4struct task_struct; 6struct task_struct;
5 7
6extern int debug_locks; 8extern int debug_locks;
@@ -11,14 +13,6 @@ extern int debug_locks_silent;
11 */ 13 */
12extern int debug_locks_off(void); 14extern int debug_locks_off(void);
13 15
14/*
15 * In the debug case we carry the caller's instruction pointer into
16 * other functions, but we dont want the function argument overhead
17 * in the nondebug case - hence these macros:
18 */
19#define _RET_IP_ (unsigned long)__builtin_return_address(0)
20#define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; })
21
22#define DEBUG_LOCKS_WARN_ON(c) \ 16#define DEBUG_LOCKS_WARN_ON(c) \
23({ \ 17({ \
24 int __ret = 0; \ 18 int __ret = 0; \