aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rt.c
Commit message (Collapse)AuthorAge
* Forward to 2.6.33-rc8Thomas Gleixner2010-02-21
| | | | | | Merge branch 'linus' into rt/head with a pile of conflicts. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* rt: Fix rwlocks/rwsem rt_[down_]read_trylock()Thomas Gleixner2009-09-15
| | | | | | | | rt_read_trylock() and rt_down_read_trylock() take the lock / semaphore unconditionally when it is write locked. Check read_depth if current owns the lock. If it's 0 we know it is write locked and return 0. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* rt: Fix recursive read lock of rw_semaphoresThomas Gleixner2009-08-25
| | | | Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* rt: Remove rwlocks BUG_ON and useless read_depth checkThomas Gleixner2009-08-23
| | | | Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* rt-locks: provide atomic_dec_and_mutex_lock for -rtThomas Gleixner2009-07-29
| | | | | | Add the missing function Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* rt-locks: implement rt_downgrade_writeSteven Rostedt2009-07-29
| | | | | | | | | | | | | | | | | | | | | | | | | The current code of rt_downgrade_write simply does a BUG(). There are places in the kernel that uses this code, and will crash a runnning preempt-rt kernel. The rt_downgrade_write converts a rwsem held for write into a rwsem held for read without ever releasing the semaphore. In -rt, the rwsems are simply a mutex. There is nothing different between a rwsem held for write, and one held for read. The difference is that one held for read can nest. This patch changes the BUG_ON() to simply BUG if the caller is not the owner of the semaphore. This patch comes from my rt-git repo, and has been tested there. Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Clark Williams <clark.williams@gmail.com> Cc: "Luis Claudio R. Goncalves" <lclaudio@uudg.org> LKML-Reference: <alpine.DEB.2.00.0904151142420.31828@gandalf.stny.rr.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* rt-locks: fix recursive rwlocks and cleanup rwsemsThomas Gleixner2009-07-29
| | | | | | | | | | recursive rwlocks are only allowed for recursive reads. recursive rwsems are not allowed at all. Follow up to Jan Blunks fix. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* rt: Make rt_down_read_trylock() behave like down_read_trylock()Jan Blunck2009-07-29
| | | | | | | | | | | This patch removes the stupid "Read locks within the self-held write lock succeed" behaviour. This is breaking in mm_take_all_locks() since it is quite common to ensure that a lock is taken with BUG_ON(down_read_trylock(&mm->mmap_sem)). Signed-off-by: Jan Blunck <jblunck@suse.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* rt: Add the preempt-rt lock replacement APIsThomas Gleixner2009-07-29
Map spinlocks, rwlocks, rw_semaphores and semaphores to the rt_mutex based locking functions for preempt-rt. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>