~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise-security

« back to all changes in this revision

Viewing changes to kernel/rtmutex.c

  • Committer: Package Import Robot
  • Author(s): Paolo Pisati, Paolo Pisati
  • Date: 2011-12-06 15:56:07 UTC
  • Revision ID: package-import@ubuntu.com-20111206155607-pcf44kv5fmhk564f
Tags: 3.2.0-1401.1
[ Paolo Pisati ]

* Rebased on top of Ubuntu-3.2.0-3.8
* Tilt-tracking @ ef2487af4bb15bdd0689631774b5a5e3a59f74e2
* Delete debian.ti-omap4/control, it shoudln't be tracked
* Fix architecture spelling (s/armel/armhf/)
* [Config] Update configs following 3.2 import
* [Config] Fix compilation: disable CODA and ARCH_OMAP3
* [Config] Fix compilation: disable Ethernet Faraday
* Update series to precise

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 *  See Documentation/rt-mutex-design.txt for details.
12
12
 */
13
13
#include <linux/spinlock.h>
14
 
#include <linux/module.h>
 
14
#include <linux/export.h>
15
15
#include <linux/sched.h>
16
16
#include <linux/timer.h>
17
17
 
579
579
                    struct rt_mutex_waiter *waiter)
580
580
{
581
581
        int ret = 0;
 
582
        int was_disabled;
582
583
 
583
584
        for (;;) {
584
585
                /* Try to acquire the lock: */
601
602
 
602
603
                raw_spin_unlock(&lock->wait_lock);
603
604
 
 
605
                was_disabled = irqs_disabled();
 
606
                if (was_disabled)
 
607
                        local_irq_enable();
 
608
 
604
609
                debug_rt_mutex_print_deadlock(waiter);
605
610
 
606
611
                schedule_rt_mutex(lock);
607
612
 
 
613
                if (was_disabled)
 
614
                        local_irq_disable();
 
615
 
608
616
                raw_spin_lock(&lock->wait_lock);
609
617
                set_current_state(state);
610
618
        }
890
898
{
891
899
        lock->owner = NULL;
892
900
        raw_spin_lock_init(&lock->wait_lock);
893
 
        plist_head_init_raw(&lock->wait_list, &lock->wait_lock);
 
901
        plist_head_init(&lock->wait_list);
894
902
 
895
903
        debug_rt_mutex_init(lock, name);
896
904
}