diff options
| author | Ingo Molnar <mingo@elte.hu> | 2006-06-27 05:54:55 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-27 20:32:47 -0400 |
| commit | e7eebaf6a81b956c989f184ee4b27277c88f8afe (patch) | |
| tree | 25adcfb17ec5f857791557a874cc1cced390ca9f /include | |
| parent | a6537be9324c67b41f6d98f5a60a1bd5a8e02861 (diff) | |
[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')
| -rw-r--r-- | include/linux/mm.h | 1 | ||||
| -rw-r--r-- | include/linux/rtmutex.h | 15 |
2 files changed, 15 insertions, 1 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 0ac255720f..c41a1299b8 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -1034,6 +1034,7 @@ static inline void | |||
| 1034 | debug_check_no_locks_freed(const void *from, unsigned long len) | 1034 | debug_check_no_locks_freed(const void *from, unsigned long len) |
| 1035 | { | 1035 | { |
| 1036 | mutex_debug_check_no_locks_freed(from, len); | 1036 | mutex_debug_check_no_locks_freed(from, len); |
| 1037 | rt_mutex_debug_check_no_locks_freed(from, len); | ||
| 1037 | } | 1038 | } |
| 1038 | 1039 | ||
| 1039 | #ifndef CONFIG_DEBUG_PAGEALLOC | 1040 | #ifndef CONFIG_DEBUG_PAGEALLOC |
diff --git a/include/linux/rtmutex.h b/include/linux/rtmutex.h index 12309c916c..fa4a3b82ba 100644 --- a/include/linux/rtmutex.h +++ b/include/linux/rtmutex.h | |||
| @@ -41,6 +41,19 @@ struct rt_mutex_waiter; | |||
| 41 | struct hrtimer_sleeper; | 41 | struct hrtimer_sleeper; |
| 42 | 42 | ||
| 43 | #ifdef CONFIG_DEBUG_RT_MUTEXES | 43 | #ifdef CONFIG_DEBUG_RT_MUTEXES |
| 44 | extern int rt_mutex_debug_check_no_locks_freed(const void *from, | ||
| 45 | unsigned long len); | ||
| 46 | extern void rt_mutex_debug_check_no_locks_held(struct task_struct *task); | ||
| 47 | #else | ||
| 48 | static inline int rt_mutex_debug_check_no_locks_freed(const void *from, | ||
| 49 | unsigned long len) | ||
| 50 | { | ||
| 51 | return 0; | ||
| 52 | } | ||
| 53 | # define rt_mutex_debug_check_no_locks_held(task) do { } while (0) | ||
| 54 | #endif | ||
| 55 | |||
| 56 | #ifdef CONFIG_DEBUG_RT_MUTEXES | ||
| 44 | # define __DEBUG_RT_MUTEX_INITIALIZER(mutexname) \ | 57 | # define __DEBUG_RT_MUTEX_INITIALIZER(mutexname) \ |
| 45 | , .name = #mutexname, .file = __FILE__, .line = __LINE__ | 58 | , .name = #mutexname, .file = __FILE__, .line = __LINE__ |
| 46 | # define rt_mutex_init(mutex) __rt_mutex_init(mutex, __FUNCTION__) | 59 | # define rt_mutex_init(mutex) __rt_mutex_init(mutex, __FUNCTION__) |
| @@ -48,7 +61,7 @@ struct hrtimer_sleeper; | |||
| 48 | #else | 61 | #else |
| 49 | # define __DEBUG_RT_MUTEX_INITIALIZER(mutexname) | 62 | # define __DEBUG_RT_MUTEX_INITIALIZER(mutexname) |
| 50 | # define rt_mutex_init(mutex) __rt_mutex_init(mutex, NULL) | 63 | # define rt_mutex_init(mutex) __rt_mutex_init(mutex, NULL) |
| 51 | # define rt_mutex_debug_task_free(t) do { } while (0) | 64 | # define rt_mutex_debug_task_free(t) do { } while (0) |
| 52 | #endif | 65 | #endif |
| 53 | 66 | ||
| 54 | #define __RT_MUTEX_INITIALIZER(mutexname) \ | 67 | #define __RT_MUTEX_INITIALIZER(mutexname) \ |
