linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* DEFINE_IDR() and the layer cache
@ 2007-07-11 18:27 Joachim Fenkes
  2007-07-11 20:29 ` Nathan Lynch
  0 siblings, 1 reply; 2+ messages in thread
From: Joachim Fenkes @ 2007-07-11 18:27 UTC (permalink / raw)
  To: linux-kernel, linuxppc-dev, jim.houston; +Cc: Stefan Roscher, Christoph Raisch

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-07-11 20:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-11 18:27 DEFINE_IDR() and the layer cache Joachim Fenkes
2007-07-11 20:29 ` Nathan Lynch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).