Annotation of researchv10dc/630/include/message.h, revision 1.1

1.1     ! root        1: /*       Copyright (c) 1987 AT&T   */
        !             2: /*       All Rights Reserved       */
        !             3: 
        !             4: /*       THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T   */
        !             5: /*       The copyright notice above does not evidence any      */
        !             6: /*       actual or intended publication of such source code.   */
        !             7: 
        !             8: #include <sccsid.h>
        !             9: HVERSION(message, @(#)message.h        1.1.1.2 (5/12/87));
        !            10: 
        !            11: 
        !            12: /* message queue defines */
        !            13: #define        IPC_CREAT       0001000
        !            14: #define IPC_EXCL       0002000
        !            15: #define        IPC_NOWAIT      0004000
        !            16: #define IPC_RMID       0
        !            17: #define        IPC_SET         1
        !            18: #define IPC_STAT       2
        !            19: #define IPC_PRIVATE    (long)0
        !            20: #define MSG_NOERROR    010000
        !            21: #define MAX_QBYTES     0020000
        !            22: #define NO_SAVE                0000010
        !            23: #define NO_COPY                0000020
        !            24: 
        !            25: 
        !            26: 
        !            27: typedef struct msgbuf { /* a message */
        !            28:        long    mtype;          /* message identifier */
        !            29:        char    mtext[1];       /* text of the message */
        !            30: } msgbuf;
        !            31: 
        !            32: typedef struct message_list { /* make a linked list of messages */
        !            33:        msgbuf  *msg;                   /* the message */
        !            34:        int     size;                   /* size of the message */
        !            35:        struct message_list *next;      /* link to the next message */
        !            36: } message_list;
        !            37: 
        !            38: 
        !            39: typedef struct msqid_ds { /* a message queue */
        !            40:        struct Proc *cid;       /* process that created the queue */
        !            41:        short   msg_qnum;       /* number of messages in the queue */
        !            42:        short   msg_qbytes;     /* number of bytes used by the queue */
        !            43:        struct Proc *msg_lspid; /* process id of the last process to send to the queue */
        !            44:        struct Proc *msg_lrpid; /* process id of the last process to rcv from the queue */
        !            45:        unsigned long msg_stime;/* time of last send to the queue */
        !            46:        unsigned long msg_rtime;/* time of the last rcv from the queue */
        !            47:        unsigned long msg_ctime;/* time of the last change to this structure */
        !            48:        message_list *msg_list; /* linked list of messages in the queue */
        !            49:        short   msg_curbytes;   /* current number of bytes used by the queue */
        !            50:        short   state;          /* used to decide if to delete when the process dies */ 
        !            51:        long    name;           /* the name of the queue (key) */
        !            52:        struct msqid_ds *next;  /* link to the next queue */
        !            53: } msqid_ds;
        !            54: 
        !            55: 
        !            56: long     msgget();               /* (key,msgflg) get a message from a queue */
        !            57: void    init_msq();             /* (mp,name,msgflg) initialize a message queue */
        !            58: int     msgctl();               /* (msqid,cmd,buf) stat, set, or remove a queue */
        !            59: int     valid_msqid();          /* (msqid) is the given msqid valid? */
        !            60: void    free_msq();             /* (msqid)free the memory used by a message queue */
        !            61: int     msgsnd();               /* (msqid,msgp,msgsz,msgflg) send a message */
        !            62: int     msgrcv();               /* (msqid,msgp,msgsz,msgtyp,msgflg) receive a message */
        !            63: message_list *rcv_message();    /* (msqid,msgtyp) get the first message of the given type */
        !            64: 
        !            65: 

unix.superglobalmegacorp.com

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