|
|
1.1 ! root 1: /* ! 2: * Copyright (c) 1994 The University of Utah and ! 3: * the Computer Systems Laboratory (CSL). All rights reserved. ! 4: * ! 5: * Permission to use, copy, modify and distribute this software and its ! 6: * documentation is hereby granted, provided that both the copyright ! 7: * notice and this permission notice appear in all copies of the ! 8: * software, derivative works or modified versions, and any portions ! 9: * thereof, and that both notices appear in supporting documentation. ! 10: * ! 11: * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS ! 12: * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF ! 13: * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. ! 14: * ! 15: * CSL requests users of this software to return to [email protected] any ! 16: * improvements that they make and grant CSL redistribution rights. ! 17: */ ! 18: /* ! 19: * File: ipc_target.h ! 20: * ! 21: * Common part of IPC ports and port sets ! 22: * representing a target of messages and migrating RPCs. ! 23: */ ! 24: ! 25: #ifndef _IPC_IPC_RECEIVER_H_ ! 26: #define _IPC_IPC_RECEIVER_H_ ! 27: ! 28: #include "ipc_mqueue.h" ! 29: #include "ipc_object.h" ! 30: #include <mach/rpc.h> ! 31: ! 32: typedef struct ipc_target { ! 33: ! 34: struct ipc_object ipt_object; ! 35: ! 36: mach_port_t ipt_name; ! 37: struct ipc_mqueue ipt_messages; ! 38: ! 39: #ifdef MIGRATING_THREADS ! 40: /*** Migrating RPC stuff ***/ ! 41: ! 42: int ipt_type; ! 43: ! 44: /* User entry info for migrating RPC */ ! 45: rpc_info_t ipt_rpcinfo; ! 46: ! 47: /* List of available activations, all active but not in use. */ ! 48: struct Act *ipt_acts; ! 49: ! 50: /* TRUE if someone is waiting for an activation from this pool. */ ! 51: int ipt_waiting; ! 52: #endif /* MIGRATING_THREADS */ ! 53: ! 54: } *ipc_target_t; ! 55: ! 56: #define IPT_TYPE_MESSAGE_RPC 1 ! 57: #define IPT_TYPE_MIGRATE_RPC 2 ! 58: ! 59: void ipc_target_init(struct ipc_target *ipt, mach_port_t name); ! 60: void ipc_target_terminate(struct ipc_target *ipt); ! 61: ! 62: #define ipt_lock(ipt) io_lock(&(ipt)->ipt_object) ! 63: #define ipt_unlock(ipt) io_unlock(&(ipt)->ipt_object) ! 64: #define ipt_reference(ipt) io_reference(&(ipt)->ipt_object) ! 65: #define ipt_release(ipt) io_release(&(ipt)->ipt_object) ! 66: #define ipt_check_unlock(ipt) io_check_unlock(&(ipt)->ipt_object) ! 67: ! 68: #endif /* _IPC_IPC_RECEIVER_H_ */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.