]> rtime.felk.cvut.cz Git - l4.git/blobdiff - l4/pkg/linux-26-headers/include/linux/shm.h
update
[l4.git] / l4 / pkg / linux-26-headers / include / linux / shm.h
index eca6235a46c0b1b89d951a90216b132c6a21cfb7..c99cef0ed7abb8afd0ccf7198e712371aad2f220 100644 (file)
@@ -3,11 +3,7 @@
 
 #include <linux/ipc.h>
 #include <linux/errno.h>
-#ifdef __KERNEL__
-#include <asm/page.h>
-#else
 #include <unistd.h>
-#endif
 
 /*
  * SHMMAX, SHMMNI and SHMALL are upper limits are defaults which can
 #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 <asm/shmparam.h>
-#endif
 
 /* Obsolete, used only for backwards compatibility and libc5 compiles */
 struct shmid_ds {
@@ -82,42 +71,5 @@ struct shm_info {
        unsigned long swap_successes;
 };
 
-#ifdef __KERNEL__
-struct shmid_kernel /* private to the kernel */
-{      
-       struct kern_ipc_perm    shm_perm;
-       struct file *           shm_file;
-       unsigned long           shm_nattch;
-       unsigned long           shm_segsz;
-       time_t                  shm_atim;
-       time_t                  shm_dtim;
-       time_t                  shm_ctim;
-       pid_t                   shm_cprid;
-       pid_t                   shm_lprid;
-       struct user_struct      *mlock_user;
-};
-
-/* shm_mode upper byte flags */
-#define        SHM_DEST        01000   /* segment will be destroyed on last detach */
-#define SHM_LOCKED      02000   /* segment will not be swapped */
-#define SHM_HUGETLB     04000   /* segment will use huge TLB pages */
-#define SHM_NORESERVE   010000  /* don't check for reservations */
-
-#ifdef CONFIG_SYSVIPC
-long do_shmat(int shmid, char __user *shmaddr, int shmflg, unsigned long *addr);
-extern int is_file_shm_hugepages(struct file *file);
-#else
-static inline long do_shmat(int shmid, char __user *shmaddr,
-                               int shmflg, unsigned long *addr)
-{
-       return -ENOSYS;
-}
-static inline int is_file_shm_hugepages(struct file *file)
-{
-       return 0;
-}
-#endif
-
-#endif /* __KERNEL__ */
 
 #endif /* _LINUX_SHM_H_ */