Linux PARISC architecture development
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@debian.org>
To: Grant Grundler <grundler@parisc-linux.org>
Cc: parisc-linux@lists.parisc-linux.org
Subject: Re: [parisc-linux] init_idle and local_irq_save
Date: Mon, 29 Mar 2004 17:31:34 +0100	[thread overview]
Message-ID: <20040329163134.GE7709@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <20040329160357.GA31448@colo.lackof.org>

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

      parent reply	other threads:[~2004-03-29 16:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-29 16:03 [parisc-linux] init_idle and local_irq_save Grant Grundler
2004-03-29 16:17 ` James Bottomley
2004-03-29 16:31 ` Matthew Wilcox [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040329163134.GE7709@parcelfarce.linux.theplanet.co.uk \
    --to=willy@debian.org \
    --cc=grundler@parisc-linux.org \
    --cc=parisc-linux@lists.parisc-linux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox