[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.00.1011082037200.2900@localhost6.localdomain6>
Date: Mon, 8 Nov 2010 20:39:11 +0100 (CET)
From: Thomas Gleixner <tglx@...utronix.de>
To: Peter Zijlstra <peterz@...radead.org>
cc: Darren Hart <dvhart@...ux.intel.com>, linux-kernel@...r.kernel.org,
Matt Fleming <matt@...sole-pimps.org>, mingo@...e.hu,
eric.dumazet@...il.com, jkacur@...hat.com,
Darren Hart <dvhltc@...ibm.com>
Subject: Re: [PATCH 3/3] futex: add futex_q static initializer
On Mon, 8 Nov 2010, Peter Zijlstra wrote:
> On Mon, 2010-11-08 at 17:42 +0100, Thomas Gleixner wrote:
> > > +#define FUTEX_Q_INIT \
> > > + { /* list gets initialized in queue_me()*/ \
> > > + .task = NULL, NULL, FUTEX_KEY_INIT \
> > > + , NULL, NULL, NULL, FUTEX_BITSET_MATCH_ANY }
> > > +
> >
> > That should be a static readonly variable with a proper C99
> > initializer.
>
> Well, it doesn't need to actually be an existing variable, but yeah it
> should definately use C99 initializers.
If you have multiple instances of q = q_init; the static variable is
more efficient vs. code/data size
Thanks,
tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists