X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=include%2Flinux%2Fshm.h;h=eca6235a46c0b1b89d951a90216b132c6a21cfb7;hb=6ac206c85233eb89533647f5fdc5ebe07320c5e5;hp=ad2e3af6599710d43269a7f4c243ebd90171925d;hpb=cb2ebc59ff52cee770cfd6ba5f23a6cc3c214648;p=linux-2.6-omap-h63xx.git diff --git a/include/linux/shm.h b/include/linux/shm.h index ad2e3af6599..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,10 +17,16 @@ #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__ #include +#endif /* Obsolete, used only for backwards compatibility and libc5 compiles */ struct shmid_ds { @@ -77,7 +87,6 @@ struct shmid_kernel /* private to the kernel */ { struct kern_ipc_perm shm_perm; struct file * shm_file; - int id; unsigned long shm_nattch; unsigned long shm_segsz; time_t shm_atim;