Annotation of kernel/ipc/ipc_marequest.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
                      3:  *
                      4:  * @APPLE_LICENSE_HEADER_START@
                      5:  * 
                      6:  * Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
                      7:  * Reserved.  This file contains Original Code and/or Modifications of
                      8:  * Original Code as defined in and that are subject to the Apple Public
                      9:  * Source License Version 1.1 (the "License").  You may not use this file
                     10:  * except in compliance with the License.  Please obtain a copy of the
                     11:  * License at http://www.apple.com/publicsource and read it before using
                     12:  * this file.
                     13:  * 
                     14:  * The Original Code and all software distributed under the License are
                     15:  * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
                     16:  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
                     17:  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
                     18:  * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
                     19:  * License for the specific language governing rights and limitations
                     20:  * under the License.
                     21:  * 
                     22:  * @APPLE_LICENSE_HEADER_END@
                     23:  */
                     24: 
                     25: /* 
                     26:  * Mach Operating System
                     27:  * Copyright (c) 1991,1990,1989 Carnegie Mellon University
                     28:  * All Rights Reserved.
                     29:  * 
                     30:  * Permission to use, copy, modify and distribute this software and its
                     31:  * documentation is hereby granted, provided that both the copyright
                     32:  * notice and this permission notice appear in all copies of the
                     33:  * software, derivative works or modified versions, and any portions
                     34:  * thereof, and that both notices appear in supporting documentation.
                     35:  * 
                     36:  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
                     37:  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
                     38:  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
                     39:  * 
                     40:  * Carnegie Mellon requests users of this software to return to
                     41:  * 
                     42:  *  Software Distribution Coordinator  or  [email protected]
                     43:  *  School of Computer Science
                     44:  *  Carnegie Mellon University
                     45:  *  Pittsburgh PA 15213-3890
                     46:  * 
                     47:  * any improvements or extensions that they make and grant Carnegie Mellon
                     48:  * the rights to redistribute these changes.
                     49:  */
                     50: /*
                     51:  *     File:   ipc/ipc_marequest.h
                     52:  *     Author: Rich Draves
                     53:  *     Date:   1989
                     54:  *
                     55:  *     Definitions for msg-accepted requests.
                     56:  */
                     57: 
                     58: #ifndef        _IPC_IPC_MAREQUEST_H_
                     59: #define _IPC_IPC_MAREQUEST_H_
                     60: 
                     61: #import <mach/features.h>
                     62: 
                     63: #include <mach/kern_return.h>
                     64: #include <mach/port.h>
                     65: 
                     66: /*
                     67:  *     A msg-accepted request is made when MACH_SEND_NOTIFY is used
                     68:  *     to force a message to a send right.  The IE_BITS_MAREQUEST bit
                     69:  *     in an entry indicates the entry is blocked because MACH_SEND_NOTIFY
                     70:  *     has already been used to force a message.  The kmsg holds
                     71:  *     a pointer to the marequest; it is destroyed when the kmsg
                     72:  *     is received/destroyed.  (If the send right is destroyed,
                     73:  *     this just changes imar_name.  If the space is destroyed,
                     74:  *     the marequest is left unchanged.)
                     75:  *
                     76:  *     Locking considerations:  The imar_space field is read-only and
                     77:  *     points to the space which locks the imar_name field.  imar_soright
                     78:  *     is read-only.  Normally it is a non-null send-once right for
                     79:  *     the msg-accepted notification, but in compat mode it is null
                     80:  *     and the notification goes to the space's notify port.  Normally
                     81:  *     imar_name is non-null, but if the send right is destroyed then
                     82:  *     it is changed to be null.  imar_next is locked by a bucket lock;
                     83:  *     imar_name is read-only when the request is in a bucket.  (So lookups
                     84:  *     in the bucket can safely check imar_space and imar_name.)
                     85:  *     imar_space and imar_soright both hold references.
                     86:  */
                     87: 
                     88: typedef struct ipc_marequest {
                     89:        struct ipc_space *imar_space;
                     90:        mach_port_t imar_name;
                     91:        struct ipc_port *imar_soright;
                     92:        struct ipc_marequest *imar_next;
                     93: } *ipc_marequest_t;
                     94: 
                     95: #define        IMAR_NULL               ((ipc_marequest_t) 0)
                     96: 
                     97: 
                     98: extern void
                     99: ipc_marequest_init();
                    100: 
                    101: #if    MACH_IPC_DEBUG
                    102: 
                    103: extern unsigned int
                    104: ipc_marequest_info(/* unsigned int *, hash_info_bucket_t *, unsigned int */);
                    105: 
                    106: #endif /* MACH_IPC_DEBUG */
                    107: 
                    108: extern mach_msg_return_t
                    109: ipc_marequest_create(/* ipc_space_t space, mach_port_t name,
                    110:                        ipc_port_t soright, ipc_marequest_t *marequestp */);
                    111: 
                    112: extern void
                    113: ipc_marequest_cancel(/* ipc_space_t space, mach_port_t name */);
                    114: 
                    115: extern void
                    116: ipc_marequest_rename(/* ipc_space_t space,
                    117:                        mach_port_t old, mach_port_t new */);
                    118: 
                    119: extern void
                    120: ipc_marequest_destroy(/* ipc_marequest_t marequest */);
                    121: 
                    122: #endif /* _IPC_IPC_MAREQUEST_H_ */

unix.superglobalmegacorp.com

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