The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/svr4/svr4_ipc.h

Version: -  FREEBSD  -  FREEBSD11  -  FREEBSD10  -  FREEBSD9  -  FREEBSD92  -  FREEBSD91  -  FREEBSD90  -  FREEBSD8  -  FREEBSD82  -  FREEBSD81  -  FREEBSD80  -  FREEBSD7  -  FREEBSD74  -  FREEBSD73  -  FREEBSD72  -  FREEBSD71  -  FREEBSD70  -  FREEBSD6  -  FREEBSD64  -  FREEBSD63  -  FREEBSD62  -  FREEBSD61  -  FREEBSD60  -  FREEBSD5  -  FREEBSD55  -  FREEBSD54  -  FREEBSD53  -  FREEBSD52  -  FREEBSD51  -  FREEBSD50  -  FREEBSD4  -  FREEBSD3  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
SearchContext: -  none  -  3  -  10 

    1 /*
    2  * Copyright (c) 1998 Mark Newton
    3  * Copyright (c) 1995 Christos Zoulas.  All rights reserved.
    4  *
    5  * Redistribution and use in source and binary forms, with or without
    6  * modification, are permitted provided that the following conditions
    7  * are met:
    8  * 1. Redistributions of source code must retain the above copyright
    9  *    notice, this list of conditions and the following disclaimer.
   10  * 2. Redistributions in binary form must reproduce the above copyright
   11  *    notice, this list of conditions and the following disclaimer in the
   12  *    documentation and/or other materials provided with the distribution.
   13  * 3. All advertising materials mentioning features or use of this software
   14  *    must display the following acknowledgement:
   15  *      This product includes software developed by Christos Zoulas.
   16  * 4. The name of the author may not be used to endorse or promote products
   17  *    derived from this software without specific prior written permission.
   18  *
   19  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
   20  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   21  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
   22  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
   23  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
   24  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
   25  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
   26  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
   27  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
   28  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   29  * 
   30  * $FreeBSD: src/sys/svr4/svr4_ipc.h,v 1.3 1999/08/28 00:51:18 peter Exp $
   31  */
   32 
   33 #ifndef _SVR4_IPC_H_
   34 #define _SVR4_IPC_H_
   35 
   36 /*
   37  * General IPC
   38  */
   39 #define SVR4_IPC_RMID           10
   40 #define SVR4_IPC_SET            11
   41 #define SVR4_IPC_STAT           12
   42 
   43 struct svr4_ipc_perm {
   44         svr4_uid_t      uid;
   45         svr4_gid_t      gid;
   46         svr4_uid_t      cuid;
   47         svr4_gid_t      cgid;
   48         svr4_mode_t     mode;
   49         u_long          seq;
   50         svr4_key_t      key;
   51         long            pad[4];
   52 };
   53 
   54 /*
   55  * Message queues
   56  */
   57 #define SVR4_msgget     0
   58 #define SVR4_msgctl     1
   59 #define SVR4_msgrcv     2
   60 #define SVR4_msgsnd     3
   61 
   62 struct svr4_msg {
   63         struct svr4_msg *msg_next;
   64         long            msg_type;
   65         u_short         msg_ts; 
   66         short           msg_spot;
   67 };
   68 
   69 struct svr4_msqid_ds {
   70         struct svr4_ipc_perm msg_perm;
   71         struct svr4_msg *msg_first;
   72         struct svr4_msg *msg_last;
   73         u_long          msg_cbytes;
   74         u_long          msg_qnum;
   75         u_long          msg_qbytes;
   76         svr4_pid_t      msg_lspid;
   77         svr4_pid_t      msg_lrpid;
   78         svr4_time_t     msg_stime;
   79         long            msg_pad1;       
   80         svr4_time_t     msg_rtime;
   81         long            msg_pad2;
   82         svr4_time_t     msg_ctime;
   83         long            msg_pad3;
   84         short           msg_cv;
   85         short           msg_qnum_cv;
   86         long            msg_pad4[3];
   87 };
   88 
   89 struct svr4_msgbuf {
   90         long    mtype;          /* message type */
   91         char    mtext[1];       /* message text */
   92 };
   93 
   94 struct svr4_msginfo {
   95         int     msgmap;
   96         int     msgmax;
   97         int     msgmnb;
   98         int     msgmni;
   99         int     msgssz;
  100         int     msgtql;
  101         u_short msgseg;
  102 };
  103 
  104 /*
  105  * Shared memory
  106  */
  107 #define SVR4_shmat      0
  108 #define SVR4_shmctl     1
  109 #define SVR4_shmdt      2
  110 #define SVR4_shmget     3
  111 
  112 /* shmctl() operations */
  113 #define SVR4_SHM_LOCK            3
  114 #define SVR4_SHM_UNLOCK          4
  115 
  116 struct svr4_shmid_ds {
  117         struct svr4_ipc_perm    shm_perm;
  118         int             shm_segsz;
  119         void            *shm_amp;
  120         u_short         shm_lkcnt;
  121         svr4_pid_t      shm_lpid;
  122         svr4_pid_t      shm_cpid;
  123         u_long          shm_nattch;
  124         u_long          shm_cnattch;
  125         svr4_time_t     shm_atime;
  126         long            shm_pad1;
  127         svr4_time_t     shm_dtime;
  128         long            shm_pad2;
  129         svr4_time_t     shm_ctime;
  130         long            shm_pad3;
  131         long            shm_pad4[4];
  132 };
  133 
  134 /*
  135  * Semaphores
  136  */
  137 #define SVR4_semctl     0
  138 #define SVR4_semget     1
  139 #define SVR4_semop      2
  140 
  141 /* semctl() operations */
  142 #define SVR4_SEM_GETNCNT         3
  143 #define SVR4_SEM_GETPID          4
  144 #define SVR4_SEM_GETVAL          5
  145 #define SVR4_SEM_GETALL          6
  146 #define SVR4_SEM_GETZCNT         7
  147 #define SVR4_SEM_SETVAL          8
  148 #define SVR4_SEM_SETALL          9
  149 
  150 struct svr4_sem {
  151         u_short         semval;
  152         svr4_pid_t      sempid;
  153         u_short         semncnt;
  154         u_short         semzcnt;
  155         u_short         semncnt_cv;
  156         u_short         semzcnt_cv;
  157 };
  158 
  159 struct svr4_semid_ds {
  160         struct svr4_ipc_perm sem_perm;
  161         struct svr4_sem *sem_base;
  162         u_short         sem_nsems;
  163         svr4_time_t     sem_otime;
  164         long            sem_pad1;
  165         svr4_time_t     sem_ctime;
  166         long            sem_pad2;
  167         long            sem_pad3[4];
  168 };
  169 
  170 struct svr4_sembuf {
  171         u_short         sem_num;
  172         short           sem_op;
  173         short           sem_flg;
  174 };
  175 
  176 #endif  /* _SVR4_IPC_H */

Cache object: b5e33c6ff6e2c4badf2c0886ce1c7a07


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.