This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: pageshift?
- To: howarth at bromo dot med dot uc dot edu
- Subject: Re: pageshift?
- From: Geoff Keating <geoffk at cygnus dot com>
- Date: Sat, 21 Oct 2000 13:57:41 -0700
- CC: drepper at redhat dot com, libc-alpha at sources dot redhat dot com
- References: <200010211620.JAA92684@bromo.med.uc.edu>
> Date: Sat, 21 Oct 2000 09:20:07 -0700 (PDT)
> From: Jack Howarth <howarth@bromo.med.uc.edu>
>
> Hi,
> On ppc our maintainer Paul Mackerras <paulus@linuxcare.com>
> for Linux 2.4 has decided to place tight wrappers around our
> asm-ppc kernel headers of the form...
>
> #ifdef __KERNEL__
>
> #endif /* __KERNEL__ */
I very much approve of this. Thanks Paul!
> While the breakage of userland programs incorrectly using
> kernel headers isn't as bad as I feared, I have found that
> procps from Redhat 7.0 has a sprinkling of PAGE_SIZE and
> PAGE_SHIFT obtained from asm/page.h.
> I believe they should be able to get PAGE_SIZE from
> the _getpagesize() call declared in sys/shm.h however I am
> unclear how to back calculate PAGE_SHIFT. The asm/page.h header
> contains...
PAGE_SHIFT is just (ffs (getpagesize ())-1). Don't use __getpagesize,
it's internal-only, use getpagesize() from unistd.h. There are no
parameters to getpagesize().
--
- Geoffrey Keating <geoffk@cygnus.com>