00001
00006 #ifndef __L4_SYS__INCLUDE__CONSTS_H__
00007 #define __L4_SYS__INCLUDE__CONSTS_H__
00008
00009
00015 #define L4_PAGESIZE (1UL << L4_PAGESHIFT)
00016
00022 #define L4_PAGEMASK (~(L4_PAGESIZE - 1))
00023
00029 #define L4_LOG2_PAGESIZE L4_PAGESHIFT
00030
00036 #define L4_SUPERPAGESIZE (1UL << L4_SUPERPAGESHIFT)
00037
00043 #define L4_SUPERPAGEMASK (~(L4_SUPERPAGESIZE - 1))
00044
00050 #define L4_LOG2_SUPERPAGESIZE L4_SUPERPAGESHIFT
00051
00058 #define L4_MAX_ADDRESS ((l4_addr_t)-1)
00059
00067 #define l4_trunc_page(x) (((l4_addr_t)(x)) & L4_PAGEMASK)
00068
00076 #define l4_round_page(x) \
00077 ((((l4_addr_t)(x)) + L4_PAGESIZE-1) & L4_PAGEMASK)
00078
00086 #define l4_trunc_superpage(x) \
00087 (((l4_addr_t)(x)) & L4_SUPERPAGEMASK)
00088
00096 #define l4_round_superpage(x) \
00097 ((((l4_addr_t)(x)) + L4_SUPERPAGESIZE-1) & L4_SUPERPAGEMASK)
00098
00099
00100 #ifndef NULL
00101 #ifndef __cplusplus
00102 # define NULL ((void *)0)
00106 #else
00107 # define NULL 0
00108 #endif
00109 #endif
00110
00111 #endif