Re: sysconf (was Re: RLIM_INFINITY inconsistency between archs)

From: H. Peter Anvin (hpa@transmeta.com)
Date: Mon Jul 31 2000 - 17:03:37 EST


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/



This archive was generated by hypermail 2b29 : Mon Jul 31 2000 - 21:00:35 EST