Annotation of coherent/a/usr/include.b4ps2/sys/msg.h, revision 1.1.1.1

1.1       root        1: /* (-lgl
                      2:  *     COHERENT Version 3.0
                      3:  *     Copyright (c) 1982, 1990 by Mark Williams Company.
                      4:  *     All rights reserved. May not be copied without permission.
                      5:  -lgl) */
                      6: #ifndef MSG_H
                      7: #define        MSG_H
                      8: /*
                      9: **     IPC Message Facility.
                     10: */
                     11: 
                     12: #include <sys/ipc.h>
                     13: #include <sys/types.h>
                     14: 
                     15: /*
                     16: **     Permission Definitions.
                     17: */
                     18: 
                     19: #define        MSG_R   0400            /* read permission */
                     20: #define        MSG_W   0200            /* write permission */
                     21: 
                     22: /*
                     23: **     ipc_perm Mode Definitions.
                     24: */
                     25: 
                     26: #define        MSG_RWAIT       01000   /* a reader is waiting for a message */
                     27: #define        MSG_WWAIT       02000   /* a writer is waiting to send */
                     28: 
                     29: /*
                     30: **     Message Operation Flags.
                     31: */
                     32: 
                     33: #define        MSG_NOERROR     010000  /* no error if big message */
                     34: 
                     35: /*
                     36: **     Structure Definitions.
                     37: */
                     38: 
                     39: /*
                     40: **     There is one msg structure for each message that may be in the system.
                     41: */
                     42: 
                     43: struct msg {
                     44: 
                     45:        struct  msg     *msg_next;      /* pointer to next message on q */
                     46:        long            msg_type;       /* message type */
                     47:        short           msg_ts;         /* message text size */
                     48:        short           msg_spot;       /* message text map address */
                     49: };
                     50: 
                     51: /*
                     52: **     There is one msg queue id data structure for each q in the system.
                     53: */
                     54: 
                     55: struct msqid_ds {
                     56: 
                     57:        struct ipc_perm msg_perm;       /* operation permission struct */
                     58:        struct msg      *msg_first;     /* ptr to first message on q */
                     59:        struct msg      *msg_last;      /* ptr to last message on q */
                     60:        unsigned short  msg_cbytes;     /* current # bytes on q */
                     61:        unsigned short  msg_qnum;       /* # of messages on q */
                     62:        unsigned short  msg_qbytes;     /* max # of bytes on q */
                     63:        unsigned short  msg_lspid;      /* pid of last msgsnd */
                     64:        unsigned short  msg_lrpid;      /* pid of last msgrcv */
                     65:        time_t          msg_stime;      /* last msgsnd time */
                     66:        time_t          msg_rtime;      /* last msgrcv time */
                     67:        time_t          msg_ctime;      /* last change time */
                     68: };
                     69: 
                     70: /*
                     71: **     User message buffer template for msgsnd and msgrcv system calls.
                     72: */
                     73: 
                     74: struct msgbuf {
                     75: 
                     76:        long            mtype;          /* message type */
                     77:        char            mtext[];        /* message text */
                     78: };
                     79: 
                     80: /*
                     81: **     Ioctl commands issued to Message device driver (Coherent specific).
                     82: */
                     83: 
                     84: #define        MSGIOC          ('M'<<8)
                     85: #define        MSGCTL          (MSGIOC|0)
                     86: #define        MSGGET          (MSGIOC|1)
                     87: #define        MSGSND          (MSGIOC|2)
                     88: #define        MSGRCV          (MSGIOC|3)
                     89: 
                     90: #endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.