lkml.org 
[lkml]   [2000]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: sysconf (was Re: RLIM_INFINITY inconsistency between archs)
Ralf Baechle wrote:
>
> On Sun, Jul 30, 2000 at 11:05:22PM -0700, H. Peter Anvin wrote:
>
> > Another alternative is to simply get rid of all uses of HZ in the
> > kernel, and replace it with either CONFIG_HZ or USER_HZ. This has the
> > additional benefit of giving a compiler error when not used properly. Thus:
> >
> > #define USER_HZ 100 /* Arch dependent */
> > #ifndef __KERNEL__
> > #define HZ USER_HZ
> > #endif
>
> This gets exported to userspace, so USER_HZ pollutes the namespace, so
> has to be hidden ...
>

Fine, make it:

#define _USER_HZ 100 /* This is in an arch-dependent file */

/* This isn't */
#ifdef __KERNEL__
# define USER_HZ _USER_HZ
#else
# define HZ _USER_HZ
#endif

--
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt

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

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