X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=include%2Flinux%2Fshm.h;h=eca6235a46c0b1b89d951a90216b132c6a21cfb7;hb=e13a2e61dd5152f5499d2003470acf9c838eab84;hp=eeaed921a1dc02d02f3a61cec5ea0c62873ecfad;hpb=c4ec20717313daafba59225f812db89595952b83;p=linux-2.6-omap-h63xx.git diff --git a/include/linux/shm.h b/include/linux/shm.h index eeaed921a1d..eca6235a46c 100644 --- a/include/linux/shm.h +++ b/include/linux/shm.h @@ -3,7 +3,11 @@ #include #include +#ifdef __KERNEL__ #include +#else +#include +#endif /* * SHMMAX, SHMMNI and SHMALL are upper limits are defaults which can @@ -13,7 +17,11 @@ #define SHMMAX 0x2000000 /* max shared seg size (bytes) */ #define SHMMIN 1 /* min shared seg size (bytes) */ #define SHMMNI 4096 /* max num of segs system wide */ +#ifdef __KERNEL__ #define SHMALL (SHMMAX/PAGE_SIZE*(SHMMNI/16)) /* max shm system wide (pages) */ +#else +#define SHMALL (SHMMAX/getpagesize()*(SHMMNI/16)) +#endif #define SHMSEG SHMMNI /* max shared segs per process */ #ifdef __KERNEL__