The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Joachim Fenkes <fenkes@de.ibm.com>
To: linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org,
	jim.houston@ccur.com
Cc: Christoph Raisch <raisch@de.ibm.com>,
	"Hoang-Nam Nguyen" <hnguyen@de.ibm.com>,
	Stefan Roscher <stefan.roscher@de.ibm.com>
Subject: DEFINE_IDR() and the layer cache
Date: Wed, 11 Jul 2007 20:27:29 +0200	[thread overview]
Message-ID: <200707112027.30490.fenkes@de.ibm.com> (raw)

Hi all,

while the idr discussion is still hot, there's another thing that caught my
eye recently:

As to my reading of idr.h, I have two choices of initializing a global idr:
 a) static struct idr foo; /* ... */ idr_init(&foo);
 b) static DEFINE_IDR(foo);

idr_init(), when called for the first time, sets up the layer
cache. idr_get_new() and friends expect the cache to exist. Now, what happens
if the first call to idr_get_new() targets an idr initialized using
DEFINE_IDR() before idr_init() has been called at least once? Could this
happen?

My $0.02,
  Joachim



             reply	other threads:[~2007-07-11 18:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-11 18:27 Joachim Fenkes [this message]
2007-07-11 20:29 ` DEFINE_IDR() and the layer cache Nathan Lynch

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=200707112027.30490.fenkes@de.ibm.com \
    --to=fenkes@de.ibm.com \
    --cc=hnguyen@de.ibm.com \
    --cc=jim.houston@ccur.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=raisch@de.ibm.com \
    --cc=stefan.roscher@de.ibm.com \
    /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