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/sys/msg.h

Version: -  FREEBSD  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  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 /* $FreeBSD: stable/4/sys/sys/msg.h 64259 2000-08-04 22:31:11Z peter $ */
    2 /*      $NetBSD: msg.h,v 1.4 1994/06/29 06:44:43 cgd Exp $      */
    3 
    4 /*
    5  * SVID compatible msg.h file
    6  *
    7  * Author:  Daniel Boulet
    8  *
    9  * Copyright 1993 Daniel Boulet and RTMX Inc.
   10  *
   11  * This system call was implemented by Daniel Boulet under contract from RTMX.
   12  *
   13  * Redistribution and use in source forms, with and without modification,
   14  * are permitted provided that this entire comment appears intact.
   15  *
   16  * Redistribution in binary form may occur without any restrictions.
   17  * Obviously, it would be nice if you gave credit where credit is due
   18  * but requiring it would be too onerous.
   19  *
   20  * This software is provided ``AS IS'' without any warranties of any kind.
   21  */
   22 
   23 #ifndef _SYS_MSG_H_
   24 #define _SYS_MSG_H_
   25 
   26 #include <sys/ipc.h>
   27 
   28 /*
   29  * The MSG_NOERROR identifier value, the msqid_ds struct and the msg struct
   30  * are as defined by the SV API Intel 386 Processor Supplement.
   31  */
   32 
   33 #define MSG_NOERROR     010000          /* don't complain about too long msgs */
   34 
   35 struct msg;
   36 
   37 struct msqid_ds {
   38         struct  ipc_perm msg_perm;      /* msg queue permission bits */
   39         struct  msg *msg_first; /* first message in the queue */
   40         struct  msg *msg_last;  /* last message in the queue */
   41         u_long  msg_cbytes;     /* number of bytes in use on the queue */
   42         u_long  msg_qnum;       /* number of msgs in the queue */
   43         u_long  msg_qbytes;     /* max # of bytes on the queue */
   44         pid_t   msg_lspid;      /* pid of last msgsnd() */
   45         pid_t   msg_lrpid;      /* pid of last msgrcv() */
   46         time_t  msg_stime;      /* time of last msgsnd() */
   47         long    msg_pad1;
   48         time_t  msg_rtime;      /* time of last msgrcv() */
   49         long    msg_pad2;
   50         time_t  msg_ctime;      /* time of last msgctl() */
   51         long    msg_pad3;
   52         long    msg_pad4[4];
   53 };
   54 
   55 /*
   56  * Structure describing a message.  The SVID doesn't suggest any
   57  * particular name for this structure.  There is a reference in the
   58  * msgop man page that reads "The structure mymsg is an example of what
   59  * this user defined buffer might look like, and includes the following
   60  * members:".  This sentence is followed by two lines equivalent
   61  * to the mtype and mtext field declarations below.  It isn't clear
   62  * if "mymsg" refers to the naem of the structure type or the name of an
   63  * instance of the structure...
   64  */
   65 struct mymsg {
   66         long    mtype;          /* message type (+ve integer) */
   67         char    mtext[1];       /* message body */
   68 };
   69 
   70 #ifdef _KERNEL
   71 
   72 /*
   73  * Based on the configuration parameters described in an SVR2 (yes, two)
   74  * config(1m) man page.
   75  *
   76  * Each message is broken up and stored in segments that are msgssz bytes
   77  * long.  For efficiency reasons, this should be a power of two.  Also,
   78  * it doesn't make sense if it is less than 8 or greater than about 256.
   79  * Consequently, msginit in kern/sysv_msg.c checks that msgssz is a power of
   80  * two between 8 and 1024 inclusive (and panic's if it isn't).
   81  */
   82 struct msginfo {
   83         int     msgmax,         /* max chars in a message */
   84                 msgmni,         /* max message queue identifiers */
   85                 msgmnb,         /* max chars in a queue */
   86                 msgtql,         /* max messages in system */
   87                 msgssz,         /* size of a message segment (see notes above) */
   88                 msgseg;         /* number of message segments */
   89 };
   90 extern struct msginfo   msginfo;
   91 #endif
   92 
   93 #ifndef _KERNEL
   94 
   95 #include <sys/cdefs.h>
   96 
   97 __BEGIN_DECLS
   98 int msgsys __P((int, ...));
   99 int msgctl __P((int, int, struct msqid_ds *));
  100 int msgget __P((key_t, int));
  101 int msgsnd __P((int, void *, size_t, int));
  102 int msgrcv __P((int, void*, size_t, long, int));
  103 __END_DECLS
  104 #endif
  105 
  106 #endif /* !_SYS_MSG_H_ */

Cache object: 7610ef21fd531e7d4c5843453d3fdbe6


[ 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.