lkml.org 
[lkml]   [2002]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: lock order in O(1) scheduler

On 10 Jan 2002, Robert Love wrote:

> I believe the code should be:
>
> if (target_cpu < smp_processor_id()) {
> spin_lock_irq(&target_rq->lock);
> spin_lock(&this_rq->lock);
> } else {
> spin_lock_irq(&this_rq->lock);
> spin_lock(&target_rq->lock);
> }
>
> Not so sure about unlocking. Ingo?

yep, correct, good catch!

the unlocking order does not matter much.

Ingo

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:18    [W:0.082 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site