]> nv-tegra.nvidia Code Review - linux-2.6.git/blobdiff - kernel/rtmutex_common.h
sched: Restore printk sanity
[linux-2.6.git] / kernel / rtmutex_common.h
index e068024eeffce3d7f4308ac422c18547ce3cef65..97a2f81866afdb6507607c4a30348f3f74564e0e 100644 (file)
@@ -51,7 +51,7 @@ struct rt_mutex_waiter {
        struct rt_mutex         *lock;
 #ifdef CONFIG_DEBUG_RT_MUTEXES
        unsigned long           ip;
-       pid_t                   deadlock_task_pid;
+       struct pid              *deadlock_task_pid;
        struct rt_mutex         *deadlock_lock;
 #endif
 };
@@ -103,7 +103,7 @@ static inline struct task_struct *rt_mutex_owner(struct rt_mutex *lock)
 
 static inline struct task_struct *rt_mutex_real_owner(struct rt_mutex *lock)
 {
-       return (struct task_struct *)
+       return (struct task_struct *)
                ((unsigned long)lock->owner & ~RT_MUTEX_HAS_WAITERS);
 }
 
@@ -112,4 +112,27 @@ static inline unsigned long rt_mutex_owner_pending(struct rt_mutex *lock)
        return (unsigned long)lock->owner & RT_MUTEX_OWNER_PENDING;
 }
 
+/*
+ * PI-futex support (proxy locking functions, etc.):
+ */
+extern struct task_struct *rt_mutex_next_owner(struct rt_mutex *lock);
+extern void rt_mutex_init_proxy_locked(struct rt_mutex *lock,
+                                      struct task_struct *proxy_owner);
+extern void rt_mutex_proxy_unlock(struct rt_mutex *lock,
+                                 struct task_struct *proxy_owner);
+extern int rt_mutex_start_proxy_lock(struct rt_mutex *lock,
+                                    struct rt_mutex_waiter *waiter,
+                                    struct task_struct *task,
+                                    int detect_deadlock);
+extern int rt_mutex_finish_proxy_lock(struct rt_mutex *lock,
+                                     struct hrtimer_sleeper *to,
+                                     struct rt_mutex_waiter *waiter,
+                                     int detect_deadlock);
+
+#ifdef CONFIG_DEBUG_RT_MUTEXES
+# include "rtmutex-debug.h"
+#else
+# include "rtmutex.h"
+#endif
+
 #endif