[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-kernel
Subject:    Re: sysconf (was Re: RLIM_INFINITY inconsistency between archs)
From:       "H. Peter Anvin" <hpa () transmeta ! com>
Date:       2000-07-31 22:03:37
[Download RAW message or body]

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/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic