lkml.org 
[lkml]   [2001]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: query about use of IFDEFS
From
Date
On Fri, 2001-11-02 at 08:36, Manik Raina wrote:
> which of the following be acceptable in the linux kernel ?
> [...]

The first. You want the code itself to be clean and clear; free of
ifdefs.

So in your header files you ifdef as needed. The simplest example of
this would be with a define:

#ifdef CONFIG_SMP
#define special_smp_thing() whatever_smp()
#else
#define special_smp_thing()
#endif

Robert Love

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:12    [W:0.039 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site