Skip to content

Commit

Permalink
rtmutex-tester: make it build without BKL
Browse files Browse the repository at this point in the history
The big kernel lock is going away, so make sure
that if it is disabled by Kconfig, we do not
try to validate it, which would result in
compile errors.

Signed-off-by: Arnd Bergmann <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Arjan van de Ven <[email protected]>
Cc: Andrew Morton <[email protected]>
  • Loading branch information
arndb committed Oct 19, 2010
1 parent 72024f1 commit 0fc86c7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions kernel/rtmutex-tester.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ static int handle_op(struct test_thread_data *td, int lockwakeup)
}

if (!lockwakeup && td->bkl == 4) {
#ifdef CONFIG_LOCK_KERNEL
unlock_kernel();
#endif
td->bkl = 0;
}
return 0;
Expand Down Expand Up @@ -133,14 +135,18 @@ static int handle_op(struct test_thread_data *td, int lockwakeup)
if (td->bkl)
return 0;
td->bkl = 1;
#ifdef CONFIG_LOCK_KERNEL
lock_kernel();
#endif
td->bkl = 4;
return 0;

case RTTEST_UNLOCKBKL:
if (td->bkl != 4)
break;
#ifdef CONFIG_LOCK_KERNEL
unlock_kernel();
#endif
td->bkl = 0;
return 0;

Expand Down

0 comments on commit 0fc86c7

Please sign in to comment.