Re: [ANNOUNCE] linux-libc-headers 2.6.8.0
From: Albert Cahalan
Date: Wed Aug 18 2004 - 21:17:20 EST
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 \
; \
})
//////////////////////////////////////////
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/