Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
0002 #ifndef _ASM_SHMBUF_H
0003 #define _ASM_SHMBUF_H
0004 
0005 #include <asm/ipcbuf.h>
0006 #include <asm/posix_types.h>
0007 
0008 /*
0009  * The shmid64_ds structure for the MIPS architecture.
0010  * Note extra padding because this structure is passed back and forth
0011  * between kernel and user space.
0012  *
0013  * As MIPS was lacking proper padding after shm_?time, we use 48 bits
0014  * of the padding at the end to store a few additional bits of the time.
0015  * libc implementations need to take care to convert this into a proper
0016  * data structure when moving to 64-bit time_t.
0017  */
0018 
0019 #ifdef __mips64
0020 struct shmid64_ds {
0021     struct ipc64_perm   shm_perm;   /* operation perms */
0022     __kernel_size_t     shm_segsz;  /* size of segment (bytes) */
0023     long            shm_atime;  /* last attach time */
0024     long            shm_dtime;  /* last detach time */
0025     long            shm_ctime;  /* last change time */
0026     __kernel_pid_t      shm_cpid;   /* pid of creator */
0027     __kernel_pid_t      shm_lpid;   /* pid of last operator */
0028     unsigned long       shm_nattch; /* no. of current attaches */
0029     unsigned long       __unused1;
0030     unsigned long       __unused2;
0031 };
0032 #else
0033 struct shmid64_ds {
0034     struct ipc64_perm   shm_perm;   /* operation perms */
0035     __kernel_size_t     shm_segsz;  /* size of segment (bytes) */
0036     unsigned long       shm_atime;  /* last attach time */
0037     unsigned long       shm_dtime;  /* last detach time */
0038     unsigned long       shm_ctime;  /* last change time */
0039     __kernel_pid_t      shm_cpid;   /* pid of creator */
0040     __kernel_pid_t      shm_lpid;   /* pid of last operator */
0041     unsigned long       shm_nattch; /* no. of current attaches */
0042     unsigned short      shm_atime_high;
0043     unsigned short      shm_dtime_high;
0044     unsigned short      shm_ctime_high;
0045     unsigned short      __unused1;
0046 };
0047 #endif
0048 
0049 struct shminfo64 {
0050     unsigned long   shmmax;
0051     unsigned long   shmmin;
0052     unsigned long   shmmni;
0053     unsigned long   shmseg;
0054     unsigned long   shmall;
0055     unsigned long   __unused1;
0056     unsigned long   __unused2;
0057     unsigned long   __unused3;
0058     unsigned long   __unused4;
0059 };
0060 
0061 #endif /* _ASM_SHMBUF_H */