[PATCH] Add try_to_freeze() to rt-test kthreads
authorLuca Tettamanti <[email protected]>
Fri, 14 Jul 2006 07:24:13 +0000 (00:24 -0700)
committerLinus Torvalds <[email protected]>
Sat, 15 Jul 2006 04:53:53 +0000 (21:53 -0700)
When CONFIG_RT_MUTEX_TESTER is enabled kernel refuses to suspend the
machine because it's unable to freeze the rt-test-* threads.

Add try_to_freeze() after schedule() so that the threads will be freezed
correctly; I've tested the patch and it lets the notebook suspends and
resumes nicely.

Signed-off-by: Luca Tettamanti <[email protected]>
Cc: Ingo Molnar <[email protected]>
Acked-by: Thomas Gleixner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
kernel/rtmutex-tester.c

index 494dac872a135823f42a6dec51a8dea301e05f17..948bd8f643e25a0c21c88134a61276eed74325c5 100644 (file)
@@ -275,6 +275,7 @@ static int test_func(void *data)
 
                /* Wait for the next command to be executed */
                schedule();
+               try_to_freeze();
 
                if (signal_pending(current))
                        flush_signals(current);