From: Albert Cahalan <albert@users.sf.net>
To: mmazur@pld-linux.org
Cc: linux-kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: [ANNOUNCE] linux-libc-headers 2.6.8.0
Date: 18 Aug 2004 19:41:11 -0400 [thread overview]
Message-ID: <1092872470.5761.1993.camel@cube> (raw)
For IA-64 and MIPS, and for any other arch with
variable page sizes, you need something like this:
////////////////////////////////////////
extern int getpagesize(void);
#define PAGE_SIZE ((unsigned long)(getpagesize()))
// This is a gcc statement-expression.
// You might want the __extension__ keyword.
#define PAGE_SHIFT ({ \
int _PAGE_SIZE = PAGE_SIZE; \
(_PAGE_SIZE > 16*1024) \
? (_PAGE_SIZE == 32*1024) \
? 15ul \
: 16ul \
: (_PAGE_SIZE == 8*1024) \
? 13ul \
: (_PAGE_SIZE == 4*1024) \
? 12ul \
: 14ul \
; \
})
//////////////////////////////////////////
next reply other threads:[~2004-08-19 2:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-18 23:41 Albert Cahalan [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-08-19 0:03 [ANNOUNCE] linux-libc-headers 2.6.8.0 Albert Cahalan
2004-08-18 22:26 Mariusz Mazur
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1092872470.5761.1993.camel@cube \
--to=albert@users.sf.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mmazur@pld-linux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.