mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 13:41:30 +00:00
[PATCH] pi-futex: rt mutex tester
RT-mutex tester: scriptable tester for rt mutexes, which allows userspace scripting of mutex unit-tests (and dynamic tests as well), using the actual rt-mutex implementation of the kernel. [akpm@osdl.org: fixlet] Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> 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>
This commit is contained in:
parent
e7eebaf6a8
commit
61a8712286
20 changed files with 1923 additions and 1 deletions
|
@ -14,6 +14,28 @@
|
|||
|
||||
#include <linux/rtmutex.h>
|
||||
|
||||
/*
|
||||
* The rtmutex in kernel tester is independent of rtmutex debugging. We
|
||||
* call schedule_rt_mutex_test() instead of schedule() for the tasks which
|
||||
* belong to the tester. That way we can delay the wakeup path of those
|
||||
* threads to provoke lock stealing and testing of complex boosting scenarios.
|
||||
*/
|
||||
#ifdef CONFIG_RT_MUTEX_TESTER
|
||||
|
||||
extern void schedule_rt_mutex_test(struct rt_mutex *lock);
|
||||
|
||||
#define schedule_rt_mutex(_lock) \
|
||||
do { \
|
||||
if (!(current->flags & PF_MUTEX_TESTER)) \
|
||||
schedule(); \
|
||||
else \
|
||||
schedule_rt_mutex_test(_lock); \
|
||||
} while (0)
|
||||
|
||||
#else
|
||||
# define schedule_rt_mutex(_lock) schedule()
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This is the control structure for tasks blocked on a rt_mutex,
|
||||
* which is allocated on the kernel stack on of the blocked task.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue