aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rtmutex.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-07-03 03:25:41 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-03 18:27:11 -0400
commit36c8b586896f60cb91a4fd526233190b34316baf (patch)
tree003246e1e676de33703daa979b3e3109ca202a89 /kernel/rtmutex.c
parent48f24c4da1ee7f3f22289cb85e8b8a73e4df4db5 (diff)
[PATCH] sched: cleanup, remove task_t, convert to struct task_struct
cleanup: remove task_t and convert all the uses to struct task_struct. I introduced it for the scheduler anno and it was a mistake. Conversion was mostly scripted, the result was reviewed and all secondary whitespace and style impact (if any) was fixed up by hand. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/rtmutex.c')
-rw-r--r--kernel/rtmutex.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/kernel/rtmutex.c b/kernel/rtmutex.c
index 91b699aa658b..d2ef13b485e7 100644
--- a/kernel/rtmutex.c
+++ b/kernel/rtmutex.c
@@ -157,7 +157,7 @@ int max_lock_depth = 1024;
157 * Decreases task's usage by one - may thus free the task. 157 * Decreases task's usage by one - may thus free the task.
158 * Returns 0 or -EDEADLK. 158 * Returns 0 or -EDEADLK.
159 */ 159 */
160static int rt_mutex_adjust_prio_chain(task_t *task, 160static int rt_mutex_adjust_prio_chain(struct task_struct *task,
161 int deadlock_detect, 161 int deadlock_detect,
162 struct rt_mutex *orig_lock, 162 struct rt_mutex *orig_lock,
163 struct rt_mutex_waiter *orig_waiter, 163 struct rt_mutex_waiter *orig_waiter,
@@ -282,6 +282,7 @@ static int rt_mutex_adjust_prio_chain(task_t *task,
282 spin_unlock_irqrestore(&task->pi_lock, flags); 282 spin_unlock_irqrestore(&task->pi_lock, flags);
283 out_put_task: 283 out_put_task:
284 put_task_struct(task); 284 put_task_struct(task);
285
285 return ret; 286 return ret;
286} 287}
287 288
@@ -403,10 +404,10 @@ static int task_blocks_on_rt_mutex(struct rt_mutex *lock,
403 struct rt_mutex_waiter *waiter, 404 struct rt_mutex_waiter *waiter,
404 int detect_deadlock) 405 int detect_deadlock)
405{ 406{
407 struct task_struct *owner = rt_mutex_owner(lock);
406 struct rt_mutex_waiter *top_waiter = waiter; 408 struct rt_mutex_waiter *top_waiter = waiter;
407 task_t *owner = rt_mutex_owner(lock);
408 int boost = 0, res;
409 unsigned long flags; 409 unsigned long flags;
410 int boost = 0, res;
410 411
411 spin_lock_irqsave(&current->pi_lock, flags); 412 spin_lock_irqsave(&current->pi_lock, flags);
412 __rt_mutex_adjust_prio(current); 413 __rt_mutex_adjust_prio(current);
@@ -527,9 +528,9 @@ static void remove_waiter(struct rt_mutex *lock,
527 struct rt_mutex_waiter *waiter) 528 struct rt_mutex_waiter *waiter)
528{ 529{
529 int first = (waiter == rt_mutex_top_waiter(lock)); 530 int first = (waiter == rt_mutex_top_waiter(lock));
530 int boost = 0; 531 struct task_struct *owner = rt_mutex_owner(lock);
531 task_t *owner = rt_mutex_owner(lock);
532 unsigned long flags; 532 unsigned long flags;
533 int boost = 0;
533 534
534 spin_lock_irqsave(&current->pi_lock, flags); 535 spin_lock_irqsave(&current->pi_lock, flags);
535 plist_del(&waiter->list_entry, &lock->wait_list); 536 plist_del(&waiter->list_entry, &lock->wait_list);