--- Gnu-Mach/ipc/ipc_port.h 2020/09/02 04:42:33 1.1.1.2 +++ Gnu-Mach/ipc/ipc_port.h 2020/09/02 04:45:04 1.1.1.3 @@ -39,9 +39,6 @@ #ifndef _IPC_IPC_PORT_H_ #define _IPC_IPC_PORT_H_ -#include -#include - #include #include #include @@ -99,24 +96,6 @@ struct ipc_port { mach_port_msgcount_t ip_msgcount; mach_port_msgcount_t ip_qlimit; struct ipc_thread_queue ip_blocked; - -#if NORMA_IPC - unsigned long ip_norma_uid; - unsigned long ip_norma_dest_node; - long ip_norma_stransit; - long ip_norma_sotransit; - long ip_norma_xmm_object_refs; - boolean_t ip_norma_is_proxy; - boolean_t ip_norma_is_special; - struct ipc_port *ip_norma_atrium; - struct ipc_port *ip_norma_queue_next; - struct ipc_port *ip_norma_xmm_object; - struct ipc_port *ip_norma_next; - long ip_norma_spare1; - long ip_norma_spare2; - long ip_norma_spare3; - long ip_norma_spare4; -#endif /* NORMA_IPC */ }; #define ip_object ip_target.ipt_object @@ -169,30 +148,6 @@ typedef struct ipc_port_request { #define IPR_NULL ((ipc_port_request_t) 0) -#if MACH_IPC_COMPAT -/* - * For backwards compatibility, the ip_pdrequest field can hold a - * send right instead of a send-once right. This is indicated by - * the low bit of the pointer. This works because the zone package - * guarantees that the two low bits of port pointers are zero. - */ - -#define ip_pdsendp(soright) ((unsigned int)(soright) & 1) -#define ip_pdsend(soright) ((ipc_port_t)((unsigned int)(soright) &~ 1)) -#define ip_pdsendm(sright) ((ipc_port_t)((unsigned int)(sright) | 1)) - -/* - * For backwards compatibility, the ipr_soright field can hold - * a space pointer. This is indicated by the low bit of the pointer. - * This works because the zone package guarantees that the two low - * bits of port and space pointers are zero. - */ - -#define ipr_spacep(soright) ((unsigned int)(soright) & 1) -#define ipr_space(soright) ((ipc_space_t)((unsigned int)(soright) &~ 1)) -#define ipr_spacem(space) ((ipc_port_t)((unsigned int)(space) | 1)) -#endif /* MACH_IPC_COMPAT */ - /* * Taking the ipc_port_multiple lock grants the privilege * to lock multiple ports at once. No ports must locked @@ -229,7 +184,7 @@ extern ipc_port_timestamp_t ipc_port_tim simple_unlock(&ipc_port_timestamp_lock_data) extern ipc_port_timestamp_t -ipc_port_timestamp(); +ipc_port_timestamp(void); /* * Compares two timestamps, and returns TRUE if one @@ -251,14 +206,14 @@ ipc_port_timestamp(); (ipc_object_t *) (portp)) extern kern_return_t -ipc_port_dnrequest(/* ipc_port_t, mach_port_t, ipc_port_t, - ipc_port_request_index_t * */); +ipc_port_dnrequest(ipc_port_t, mach_port_t, ipc_port_t, + ipc_port_request_index_t *); extern kern_return_t -ipc_port_dngrow(/* ipc_port_t */); +ipc_port_dngrow(ipc_port_t); extern ipc_port_t -ipc_port_dncancel(/* ipc_port_t, mach_port_t, ipc_port_request_index_t */); +ipc_port_dncancel(ipc_port_t, mach_port_t, ipc_port_request_index_t); #define ipc_port_dnrename(port, index, oname, nname) \ MACRO_BEGIN \ @@ -301,58 +256,58 @@ MACRO_BEGIN \ MACRO_END extern struct ipc_mqueue * -ipc_port_lock_mqueue(/* ipc_port_t */); +ipc_port_lock_mqueue(ipc_port_t); extern void -ipc_port_set_seqno(/* ipc_port_t, mach_port_seqno_t */); +ipc_port_set_seqno(ipc_port_t, mach_port_seqno_t); extern void -ipc_port_clear_receiver(/* ipc_port_t */); +ipc_port_clear_receiver(ipc_port_t); extern void -ipc_port_init(/* ipc_port_t, ipc_space_t, mach_port_t */); +ipc_port_init(ipc_port_t, ipc_space_t, mach_port_t); extern kern_return_t -ipc_port_alloc(/* ipc_space_t, mach_port_t *, ipc_port_t * */); +ipc_port_alloc(ipc_space_t, mach_port_t *, ipc_port_t *); extern kern_return_t -ipc_port_alloc_name(/* ipc_space_t, mach_port_t, ipc_port_t * */); +ipc_port_alloc_name(ipc_space_t, mach_port_t, ipc_port_t *); extern void -ipc_port_destroy(/* ipc_port_t */); +ipc_port_destroy(ipc_port_t); extern boolean_t -ipc_port_check_circularity(/* ipc_port_t, ipc_port_t */); +ipc_port_check_circularity(ipc_port_t, ipc_port_t); extern ipc_port_t -ipc_port_lookup_notify(/* ipc_space_t, mach_port_t */); +ipc_port_lookup_notify(ipc_space_t, mach_port_t); extern ipc_port_t -ipc_port_make_send(/* ipc_port_t */); +ipc_port_make_send(ipc_port_t); extern ipc_port_t -ipc_port_copy_send(/* ipc_port_t */); +ipc_port_copy_send(ipc_port_t); extern mach_port_t -ipc_port_copyout_send(/* ipc_port_t, ipc_space_t */); +ipc_port_copyout_send(ipc_port_t, ipc_space_t); extern void -ipc_port_release_send(/* ipc_port_t */); +ipc_port_release_send(ipc_port_t); extern ipc_port_t -ipc_port_make_sonce(/* ipc_port_t */); +ipc_port_make_sonce(ipc_port_t); extern void -ipc_port_release_sonce(/* ipc_port_t */); +ipc_port_release_sonce(ipc_port_t); extern void -ipc_port_release_receive(/* ipc_port_t */); +ipc_port_release_receive(ipc_port_t); extern ipc_port_t -ipc_port_alloc_special(/* ipc_space_t */); +ipc_port_alloc_special(ipc_space_t); extern void -ipc_port_dealloc_special(/* ipc_port_t */); +ipc_port_dealloc_special(ipc_port_t, ipc_space_t); #define ipc_port_alloc_kernel() \ ipc_port_alloc_special(ipc_space_kernel) @@ -370,38 +325,4 @@ ipc_port_dealloc_special(/* ipc_port_t * #define ipc_port_release(port) \ ipc_object_release(&(port)->ip_object) -#if MACH_IPC_COMPAT - -extern kern_return_t -ipc_port_alloc_compat(/* ipc_space_t, mach_port_t *, ipc_port_t * */); - -extern mach_port_t -ipc_port_copyout_send_compat(/* ipc_port_t, ipc_space_t */); - -extern mach_port_t -ipc_port_copyout_receiver(/* ipc_port_t, ipc_space_t */); - -#endif /* MACH_IPC_COMPAT */ - -extern void -ipc_port_print(/* ipc_port_t */); - -#if NORMA_IPC - -#define IP_NORMA_IS_PROXY(port) ((port)->ip_norma_is_proxy) - -/* - * A proxy never has a real nsrequest, but is always has a fake - * nsrequest so that the norma ipc system is notified when there - * are no send rights for a proxy. A fake nsrequest is indicated by - * the low bit of the pointer. This works because the zone package - * guarantees that the two low bits of port pointers are zero. - */ - -#define ip_nsproxyp(nsrequest) ((unsigned int)(nsrequest) & 1) -#define ip_nsproxy(nsrequest) ((ipc_port_t)((unsigned int)(nsrequest) &~ 1)) -#define ip_nsproxym(proxy) ((ipc_port_t)((unsigned int)(proxy) | 1)) - -#endif /* NORMA_IPC */ - #endif /* _IPC_IPC_PORT_H_ */