|
|
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: * Copyright (c) 1995, 1994, 1993, 1992, 1991, 1990 ! 27: * Open Software Foundation, Inc. ! 28: * ! 29: * Permission to use, copy, modify, and distribute this software and ! 30: * its documentation for any purpose and without fee is hereby granted, ! 31: * provided that the above copyright notice appears in all copies and ! 32: * that both the copyright notice and this permission notice appear in ! 33: * supporting documentation, and that the name of ("OSF") or Open Software ! 34: * Foundation not be used in advertising or publicity pertaining to ! 35: * distribution of the software without specific, written prior permission. ! 36: * ! 37: * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE ! 38: * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! 39: * FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL OSF BE LIABLE FOR ANY ! 40: * SPECIAL, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ! 41: * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ! 42: * ACTION OF CONTRACT, NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING ! 43: * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE ! 44: */ ! 45: /* ! 46: * OSF Research Institute MK6.1 (unencumbered) 1/31/1995 ! 47: */ ! 48: /* ! 49: * Mach Operating System ! 50: * Copyright (c) 1991,1990,1989 Carnegie Mellon University ! 51: * All Rights Reserved. ! 52: * ! 53: * Permission to use, copy, modify and distribute this software and its ! 54: * documentation is hereby granted, provided that both the copyright ! 55: * notice and this permission notice appear in all copies of the ! 56: * software, derivative works or modified versions, and any portions ! 57: * thereof, and that both notices appear in supporting documentation. ! 58: * ! 59: * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" ! 60: * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR ! 61: * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. ! 62: * ! 63: * Carnegie Mellon requests users of this software to return to ! 64: * ! 65: * Software Distribution Coordinator or [email protected] ! 66: * School of Computer Science ! 67: * Carnegie Mellon University ! 68: * Pittsburgh PA 15213-3890 ! 69: * ! 70: * any improvements or extensions that they make and grant Carnegie Mellon ! 71: * the rights to redistribute these changes. ! 72: */ ! 73: /* ! 74: * File: ipc/ipc_pset.h ! 75: * Author: Rich Draves ! 76: * Date: 1989 ! 77: * ! 78: * Definitions for port sets. ! 79: */ ! 80: ! 81: #ifndef _IPC_IPC_PSET_H_ ! 82: #define _IPC_IPC_PSET_H_ ! 83: ! 84: #include <mach/port.h> ! 85: #include <mach/kern_return.h> ! 86: #include <ipc/ipc_object.h> ! 87: #include <ipc/ipc_mqueue.h> ! 88: ! 89: typedef struct ipc_pset { ! 90: struct ipc_object ips_object; ! 91: ! 92: mach_port_t ips_local_name; ! 93: struct ipc_mqueue ips_messages; ! 94: } *ipc_pset_t; ! 95: ! 96: #define ips_references ips_object.io_references ! 97: ! 98: #define IPS_NULL ((ipc_pset_t) IO_NULL) ! 99: ! 100: #define ips_active(pset) io_active(&(pset)->ips_object) ! 101: #define ips_lock(pset) io_lock(&(pset)->ips_object) ! 102: #define ips_lock_try(pset) io_lock_try(&(pset)->ips_object) ! 103: #define ips_unlock(pset) io_unlock(&(pset)->ips_object) ! 104: #define ips_check_unlock(pset) io_check_unlock(&(pset)->ips_object) ! 105: #define ips_reference(pset) io_reference(&(pset)->ips_object) ! 106: #define ips_release(pset) io_release(&(pset)->ips_object) ! 107: ! 108: /* Allocate a port set */ ! 109: extern kern_return_t ipc_pset_alloc( ! 110: ipc_space_t space, ! 111: mach_port_t *namep, ! 112: ipc_pset_t *psetp); ! 113: ! 114: /* Allocate a port set, with a specific name */ ! 115: extern kern_return_t ipc_pset_alloc_name( ! 116: ipc_space_t space, ! 117: mach_port_t name, ! 118: ipc_pset_t *psetp); ! 119: ! 120: /* Remove a port from a port set */ ! 121: extern void ipc_pset_remove( ! 122: ipc_pset_t pset, ! 123: ipc_port_t port); ! 124: ! 125: /* Remove a port from its current port set to the specified port set */ ! 126: extern kern_return_t ipc_pset_move( ! 127: ipc_space_t space, ! 128: ipc_port_t port, ! 129: ipc_pset_t nset); ! 130: ! 131: /* Destroy a port_set */ ! 132: extern void ipc_pset_destroy( ! 133: ipc_pset_t pset); ! 134: ! 135: #define ipc_pset_reference(pset) \ ! 136: ipc_object_reference(&(pset)->ips_object) ! 137: ! 138: #define ipc_pset_release(pset) \ ! 139: ipc_object_release(&(pset)->ips_object) ! 140: ! 141: #endif /* _IPC_IPC_PSET_H_ */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.