[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20090511192730.GF28684@elte.hu>
Date: Mon, 11 May 2009 21:27:30 +0200
From: Ingo Molnar <mingo@...e.hu>
To: Alexey Dobriyan <adobriyan@...il.com>
Cc: Christoph Hellwig <hch@...radead.org>, mingo@...hat.com,
hpa@...or.com, linux-kernel@...r.kernel.org, tglx@...utronix.de,
linux-tip-commits@...r.kernel.org
Subject: Re: [tip:x86/asm] x86, 64-bit: ifdef out struct thread_struct::ip
* Alexey Dobriyan <adobriyan@...il.com> wrote:
> On Mon, May 11, 2009 at 8:03 PM, Christoph Hellwig <hch@...radead.org> wrote:
> > On Mon, May 11, 2009 at 03:09:40PM +0000, tip-bot for Alexey Dobriyan wrote:
> >> +#ifdef CONFIG_X86_32
> >> unsigned long ip;
> >> +#endif
> >> #ifdef CONFIG_X86_64
> >> unsigned long fs;
> >> #endif
> >
> > What happened to the good old concept of #if #else #endif?
>
> #else suggests alternative which is not the case.
> ->ip and ->fs can be in different parts of thread_struct.
Yes, it's cleaner to have them separate. #if / #else / #endif would
be shorter by one line, and it would be thicker by a big confusion
factor: "why is fs the alternative on 64-bit of 32-bit's ip??"
They could also move apart later on, if structure packing
constraints call for it.
Ingo
--
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