=================================================================== RCS file: /cvs/prex-old/include/sys/param.h,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -u -r1.1.1.1 -r1.1.1.1.2.1 --- prex-old/include/sys/param.h 2008/06/03 10:38:44 1.1.1.1 +++ prex-old/include/sys/param.h 2008/08/13 17:12:28 1.1.1.1.2.1 @@ -36,12 +36,6 @@ #include -#define BSD 199506 /* System version (year & month). */ -#define BSD4_3 1 -#define BSD4_4 1 - -#include - #ifndef LOCORE #include #endif @@ -65,6 +59,7 @@ #define NOGROUP 65535 /* marker for empty group set member */ #define MAXHOSTNAMELEN 32 /* max hostname size */ +/* The following name length include a null-terminate charcter */ #define MAXTASKNAME 12 /* max task name */ #define MAXDEVNAME 12 /* max device name */ #define MAXOBJNAME 16 /* max object name */ @@ -75,10 +70,17 @@ #define KSTACK_SIZE CONFIG_KSTACK_SIZE /* kernel stack size */ #define USTACK_SIZE CONFIG_USTACK_SIZE /* user stack size */ +#ifndef NULL +#if !defined(__cplusplus) +#define NULL ((void *)0) +#else +#define NULL 0 +#endif +#endif + /* More types and definitions used throughout the kernel. */ #ifdef KERNEL #include -#include #endif #ifndef KERNEL @@ -90,18 +92,20 @@ /* * Round p (pointer or byte index) up to a correctly-aligned value for all - * data types (int, long, ...). The result is u_int and must be cast to + * data types (int, long, ...). The result is u_long and must be cast to * any desired pointer type. */ #define ALIGNBYTES 3 -#define ALIGN(p) (((u_int)(p) + ALIGNBYTES) &~ ALIGNBYTES) +#define ALIGN(p) (((vaddr_t)(p) + ALIGNBYTES) &~ ALIGNBYTES) /* * Memory page */ #define PAGE_MASK (PAGE_SIZE-1) -#define PAGE_ALIGN(n) ((((u_long)(n)) + PAGE_MASK) & ~PAGE_MASK) -#define PAGE_TRUNC(n) (((u_long)(n)) & ~PAGE_MASK) + +#define PAGE_ALIGN(n) ((((vaddr_t)(n)) + PAGE_MASK) & (vaddr_t)~PAGE_MASK) + +#define PAGE_TRUNC(n) (((vaddr_t)(n)) & (vaddr_t)~PAGE_MASK) /* * MAXPATHLEN defines the longest permissable path length after expanding