On PREEMPT_RT the locks are quite different so they can't be tested as it
is done below. The alternative is to test for the waitlock within
This is the bare minimun to get it compiled. Problems which exist on
- none of the locks (spinlock_t, rwlock_t, mutex_t, rw_semaphore) may
be acquired with disabled preemption or interrupts.
If I read the code correct the it is possible to acquire a mutex_t
with disabled interrupts.
I don't know how to obtain a lock pointer. Technically they are not
exported to userland.
- memory can not be allocated with disabled preemption or interrupts
even with GFP_ATOMIC.
Signed-off-by: Sebastian Andrzej Siewior <firstname.lastname@example.org>
Cc: Konstantin Khlebnikov <email@example.com>
Cc: Peter Zijlstra <firstname.lastname@example.org>
Cc: Thomas Gleixner <email@example.com>
Signed-off-by: Andrew Morton <firstname.lastname@example.org>
Signed-off-by: Linus Torvalds <email@example.com>