summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-06-27 02:54:55 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-27 17:32:47 -0700
commite7eebaf6a81b956c989f184ee4b27277c88f8afe (patch)
tree25adcfb17ec5f857791557a874cc1cced390ca9f /include/linux
parenta6537be9324c67b41f6d98f5a60a1bd5a8e02861 (diff)
downloadop-kernel-dev-e7eebaf6a81b956c989f184ee4b27277c88f8afe.zip
op-kernel-dev-e7eebaf6a81b956c989f184ee4b27277c88f8afe.tar.gz
[PATCH] pi-futex: rt mutex debug
Runtime debugging functionality for rt-mutexes. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mm.h1
-rw-r--r--include/linux/rtmutex.h15
2 files changed, 15 insertions, 1 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 0ac2557..c41a129 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1034,6 +1034,7 @@ static inline void
debug_check_no_locks_freed(const void *from, unsigned long len)
{
mutex_debug_check_no_locks_freed(from, len);
+ rt_mutex_debug_check_no_locks_freed(from, len);
}
#ifndef CONFIG_DEBUG_PAGEALLOC
diff --git a/include/linux/rtmutex.h b/include/linux/rtmutex.h
index 12309c9..fa4a3b8 100644
--- a/include/linux/rtmutex.h
+++ b/include/linux/rtmutex.h
@@ -41,6 +41,19 @@ struct rt_mutex_waiter;
struct hrtimer_sleeper;
#ifdef CONFIG_DEBUG_RT_MUTEXES
+ extern int rt_mutex_debug_check_no_locks_freed(const void *from,
+ unsigned long len);
+ extern void rt_mutex_debug_check_no_locks_held(struct task_struct *task);
+#else
+ static inline int rt_mutex_debug_check_no_locks_freed(const void *from,
+ unsigned long len)
+ {
+ return 0;
+ }
+# define rt_mutex_debug_check_no_locks_held(task) do { } while (0)
+#endif
+
+#ifdef CONFIG_DEBUG_RT_MUTEXES
# define __DEBUG_RT_MUTEX_INITIALIZER(mutexname) \
, .name = #mutexname, .file = __FILE__, .line = __LINE__
# define rt_mutex_init(mutex) __rt_mutex_init(mutex, __FUNCTION__)
@@ -48,7 +61,7 @@ struct hrtimer_sleeper;
#else
# define __DEBUG_RT_MUTEX_INITIALIZER(mutexname)
# define rt_mutex_init(mutex) __rt_mutex_init(mutex, NULL)
-# define rt_mutex_debug_task_free(t) do { } while (0)
+# define rt_mutex_debug_task_free(t) do { } while (0)
#endif
#define __RT_MUTEX_INITIALIZER(mutexname) \
OpenPOWER on IntegriCloud