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/ipc/ipc_marequest.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /* 
    2  * Mach Operating System
    3  * Copyright (c) 1991,1990,1989 Carnegie Mellon University
    4  * All Rights Reserved.
    5  * 
    6  * Permission to use, copy, modify and distribute this software and its
    7  * documentation is hereby granted, provided that both the copyright
    8  * notice and this permission notice appear in all copies of the
    9  * software, derivative works or modified versions, and any portions
   10  * thereof, and that both notices appear in supporting documentation.
   11  * 
   12  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
   13  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
   14  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
   15  * 
   16  * Carnegie Mellon requests users of this software to return to
   17  * 
   18  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
   19  *  School of Computer Science
   20  *  Carnegie Mellon University
   21  *  Pittsburgh PA 15213-3890
   22  * 
   23  * any improvements or extensions that they make and grant Carnegie Mellon
   24  * the rights to redistribute these changes.
   25  */
   26 /*
   27  * HISTORY
   28  * $Log:        ipc_marequest.h,v $
   29  * Revision 2.6  92/01/14  16:44:40  rpd
   30  *      Changed ipc_marequest_info for CountInOut.
   31  *      [92/01/14            rpd]
   32  * 
   33  * Revision 2.5  91/05/14  16:33:47  mrt
   34  *      Correcting copyright
   35  * 
   36  * Revision 2.4  91/02/05  17:22:20  mrt
   37  *      Changed to new Mach copyright
   38  *      [91/02/01  15:46:14  mrt]
   39  * 
   40  * Revision 2.3  91/01/08  15:14:30  rpd
   41  *      Changed ipc_info_bucket_t to hash_info_bucket_t.
   42  *      [91/01/02            rpd]
   43  * 
   44  * Revision 2.2  90/06/02  14:50:35  rpd
   45  *      Created for new IPC.
   46  *      [90/03/26  20:56:53  rpd]
   47  * 
   48  */
   49 /*
   50  *      File:   ipc/ipc_marequest.h
   51  *      Author: Rich Draves
   52  *      Date:   1989
   53  *
   54  *      Definitions for msg-accepted requests.
   55  */
   56 
   57 #ifndef _IPC_IPC_MAREQUEST_H_
   58 #define _IPC_IPC_MAREQUEST_H_
   59 
   60 #include <mach_ipc_debug.h>
   61 
   62 #include <mach/kern_return.h>
   63 #include <mach/port.h>
   64 
   65 /*
   66  *      A msg-accepted request is made when MACH_SEND_NOTIFY is used
   67  *      to force a message to a send right.  The IE_BITS_MAREQUEST bit
   68  *      in an entry indicates the entry is blocked because MACH_SEND_NOTIFY
   69  *      has already been used to force a message.  The kmsg holds
   70  *      a pointer to the marequest; it is destroyed when the kmsg
   71  *      is received/destroyed.  (If the send right is destroyed,
   72  *      this just changes imar_name.  If the space is destroyed,
   73  *      the marequest is left unchanged.)
   74  *
   75  *      Locking considerations:  The imar_space field is read-only and
   76  *      points to the space which locks the imar_name field.  imar_soright
   77  *      is read-only.  Normally it is a non-null send-once right for
   78  *      the msg-accepted notification, but in compat mode it is null
   79  *      and the notification goes to the space's notify port.  Normally
   80  *      imar_name is non-null, but if the send right is destroyed then
   81  *      it is changed to be null.  imar_next is locked by a bucket lock;
   82  *      imar_name is read-only when the request is in a bucket.  (So lookups
   83  *      in the bucket can safely check imar_space and imar_name.)
   84  *      imar_space and imar_soright both hold references.
   85  */
   86 
   87 typedef struct ipc_marequest {
   88         struct ipc_space *imar_space;
   89         mach_port_t imar_name;
   90         struct ipc_port *imar_soright;
   91         struct ipc_marequest *imar_next;
   92 } *ipc_marequest_t;
   93 
   94 #define IMAR_NULL               ((ipc_marequest_t) 0)
   95 
   96 
   97 extern void
   98 ipc_marequest_init();
   99 
  100 #if     MACH_IPC_DEBUG
  101 
  102 extern unsigned int
  103 ipc_marequest_info(/* unsigned int *, hash_info_bucket_t *, unsigned int */);
  104 
  105 #endif  MACH_IPC_DEBUG
  106 
  107 extern mach_msg_return_t
  108 ipc_marequest_create(/* ipc_space_t space, mach_port_t name,
  109                         ipc_port_t soright, ipc_marequest_t *marequestp */);
  110 
  111 extern void
  112 ipc_marequest_cancel(/* ipc_space_t space, mach_port_t name */);
  113 
  114 extern void
  115 ipc_marequest_rename(/* ipc_space_t space,
  116                         mach_port_t old, mach_port_t new */);
  117 
  118 extern void
  119 ipc_marequest_destroy(/* ipc_marequest_t marequest */);
  120 
  121 #endif  _IPC_IPC_MAREQUEST_H_

Cache object: 76df6c4f125eb83d5746194fff4343dd


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