| .. | .. | 
|---|
| 15 | 15 |   | 
|---|
| 16 | 16 |  #include <linux/rtmutex.h> | 
|---|
| 17 | 17 |  #include <linux/sched/wake_q.h> | 
|---|
 | 18 | +#include <linux/sched/debug.h>  | 
|---|
| 18 | 19 |   | 
|---|
| 19 | 20 |  /* | 
|---|
| 20 | 21 |   * This is the control structure for tasks blocked on a rt_mutex, | 
|---|
| .. | .. | 
|---|
| 29 | 30 |  	struct rb_node          pi_tree_entry; | 
|---|
| 30 | 31 |  	struct task_struct	*task; | 
|---|
| 31 | 32 |  	struct rt_mutex		*lock; | 
|---|
| 32 |  | -#ifdef CONFIG_DEBUG_RT_MUTEXES  | 
|---|
| 33 |  | -	unsigned long		ip;  | 
|---|
| 34 |  | -	struct pid		*deadlock_task_pid;  | 
|---|
| 35 |  | -	struct rt_mutex		*deadlock_lock;  | 
|---|
| 36 |  | -#endif  | 
|---|
| 37 | 33 |  	int prio; | 
|---|
 | 34 | +	bool			savestate;  | 
|---|
| 38 | 35 |  	u64 deadline; | 
|---|
| 39 | 36 |  }; | 
|---|
| 40 | 37 |   | 
|---|
| .. | .. | 
|---|
| 130 | 127 |  /* | 
|---|
| 131 | 128 |   * PI-futex support (proxy locking functions, etc.): | 
|---|
| 132 | 129 |   */ | 
|---|
 | 130 | +#define PI_WAKEUP_INPROGRESS	((struct rt_mutex_waiter *) 1)  | 
|---|
 | 131 | +#define PI_REQUEUE_INPROGRESS	((struct rt_mutex_waiter *) 2)  | 
|---|
 | 132 | +  | 
|---|
| 133 | 133 |  extern struct task_struct *rt_mutex_next_owner(struct rt_mutex *lock); | 
|---|
| 134 | 134 |  extern void rt_mutex_init_proxy_locked(struct rt_mutex *lock, | 
|---|
| 135 | 135 |  				       struct task_struct *proxy_owner); | 
|---|
| 136 | 136 |  extern void rt_mutex_proxy_unlock(struct rt_mutex *lock); | 
|---|
| 137 |  | -extern void rt_mutex_init_waiter(struct rt_mutex_waiter *waiter);  | 
|---|
 | 137 | +extern void rt_mutex_init_waiter(struct rt_mutex_waiter *waiter, bool savetate);  | 
|---|
| 138 | 138 |  extern int __rt_mutex_start_proxy_lock(struct rt_mutex *lock, | 
|---|
| 139 | 139 |  				     struct rt_mutex_waiter *waiter, | 
|---|
| 140 | 140 |  				     struct task_struct *task); | 
|---|
| .. | .. | 
|---|
| 152 | 152 |   | 
|---|
| 153 | 153 |  extern void rt_mutex_futex_unlock(struct rt_mutex *lock); | 
|---|
| 154 | 154 |  extern bool __rt_mutex_futex_unlock(struct rt_mutex *lock, | 
|---|
| 155 |  | -				 struct wake_q_head *wqh);  | 
|---|
 | 155 | +				 struct wake_q_head *wqh,  | 
|---|
 | 156 | +				 struct wake_q_head *wq_sleeper);  | 
|---|
| 156 | 157 |   | 
|---|
| 157 |  | -extern void rt_mutex_postunlock(struct wake_q_head *wake_q);  | 
|---|
 | 158 | +extern void rt_mutex_postunlock(struct wake_q_head *wake_q,  | 
|---|
 | 159 | +				struct wake_q_head *wake_sleeper_q);  | 
|---|
 | 160 | +  | 
|---|
 | 161 | +/* RW semaphore special interface */  | 
|---|
 | 162 | +struct ww_acquire_ctx;  | 
|---|
 | 163 | +  | 
|---|
 | 164 | +extern int __rt_mutex_lock_state(struct rt_mutex *lock, int state);  | 
|---|
 | 165 | +extern int __rt_mutex_trylock(struct rt_mutex *lock);  | 
|---|
 | 166 | +extern void __rt_mutex_unlock(struct rt_mutex *lock);  | 
|---|
 | 167 | +int __sched rt_mutex_slowlock_locked(struct rt_mutex *lock, int state,  | 
|---|
 | 168 | +				     struct hrtimer_sleeper *timeout,  | 
|---|
 | 169 | +				     enum rtmutex_chainwalk chwalk,  | 
|---|
 | 170 | +				     struct ww_acquire_ctx *ww_ctx,  | 
|---|
 | 171 | +				     struct rt_mutex_waiter *waiter);  | 
|---|
 | 172 | +void __sched rt_spin_lock_slowlock_locked(struct rt_mutex *lock,  | 
|---|
 | 173 | +					  struct rt_mutex_waiter *waiter,  | 
|---|
 | 174 | +					  unsigned long flags);  | 
|---|
 | 175 | +void __sched rt_spin_lock_slowunlock(struct rt_mutex *lock);  | 
|---|
| 158 | 176 |   | 
|---|
| 159 | 177 |  #ifdef CONFIG_DEBUG_RT_MUTEXES | 
|---|
| 160 | 178 |  # include "rtmutex-debug.h" | 
|---|