[parisc-linux] init_idle and local_irq_save

Matthew Wilcox willy at debian.org
Mon Mar 29 09:31:34 MST 2004


On Mon, Mar 29, 2004 at 09:03:57AM -0700, Grant Grundler wrote:
> o double_rq_lock() acquires the locks with lowest address first.
>   double_rq_unlock() does not release those in the inverse order.
>   Is that a problem?

No.  You have two possibilities (locks A, B; acquire and release):

1. Aa Ba Ar Br
2. Aa Ba Br Ar

It doesn't matter how you combine them; either you are waiting for A or
you have A and are waiting for B.  You never have B and are waiting for A.
Case 2 is the more common idiom since B is then entirely nested within A,
but lock A ranks lock B in both cases, so you're safe.

-- 
"Next the statesmen will invent cheap lies, putting the blame upon 
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince 
himself that the war is just, and will thank God for the better sleep 
he enjoys after this process of grotesque self-deception." -- Mark Twain


More information about the parisc-linux mailing list