From: Andi Kleen <ak@muc.de>
To: Daniele Lugli <genlogic@inrete.it>
Cc: linux-kernel@vger.kernel.org
Subject: Re: unhappy with current.h
Date: 14 Oct 2002 22:45:30 +0200 [thread overview]
Message-ID: <m33cr8kavp.fsf@averell.firstfloor.org> (raw)
In-Reply-To: <3DAB1F00.667B82B5@inrete.it>
Daniele Lugli <genlogic@inrete.it> writes:
> *** one of my data structures has a field named 'current'. ***
>
> Pretty common word, isn't it? Would you think it can cause such a
> trouble? But in some of my files I happen to indirectly include
> <asm/current.h> (kernel 2.4.18 for i386), containing the following line:
>
> #define current get_current()
How about changing the definition to:
#define current ((struct task_struct *)get_current())
That should get the same effect as currently for kernel code, but
will guarantee a syntax error if it's used in a structure declaration.
-Andi
next prev parent reply other threads:[~2002-10-14 20:44 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-14 19:46 unhappy with current.h Daniele Lugli
2002-10-14 19:52 ` David S. Miller
2002-10-14 20:18 ` Daniele Lugli
2002-10-14 20:24 ` Chris Wedgwood
2002-10-15 0:00 ` Rik van Riel
2002-10-15 1:05 ` Chris Wedgwood
2002-10-15 1:12 ` Murray J. Root
2002-10-15 14:11 ` Mikael Pettersson
2002-10-15 20:29 ` Daniele Lugli
2002-10-15 20:44 ` Alexander Viro
2002-10-15 21:01 ` Mikael Pettersson
2002-10-14 20:33 ` Richard B. Johnson
2002-10-14 20:33 ` David S. Miller
2002-10-14 20:37 ` Olivier Galibert
2002-10-15 18:31 ` Richard B. Johnson
2002-10-14 21:22 ` Daniele Lugli
2002-10-15 17:08 ` Richard B. Johnson
2002-10-14 20:45 ` Andi Kleen [this message]
2002-10-15 1:09 ` Chris Wedgwood
[not found] <20021014.161535.17120.336861@webmail4.nyc.untd.com>
2002-10-14 20:24 ` Daniele Lugli
-- strict thread matches above, loose matches on Subject: below --
2002-10-18 14:49 Jeffrey Lim
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=m33cr8kavp.fsf@averell.firstfloor.org \
--to=ak@muc.de \
--cc=genlogic@inrete.it \
--cc=linux-kernel@vger.kernel.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