On Fri, Feb 21, 2014 at 12:48:49PM +0100, Justus Winter wrote: > Add a field ip_protected_payload and a flag ip_has_protected_payload > to struct ipc_port.
> diff --git a/ipc/ipc_port.h b/ipc/ipc_port.h > index 27d2e49..4c7c742 100644 > --- a/ipc/ipc_port.h > +++ b/ipc/ipc_port.h > @@ -71,6 +71,10 @@ typedef unsigned int ipc_port_timestamp_t; > struct ipc_port { > struct ipc_target ip_target; > > + /* Flags. */ > + unsigned int ip_has_protected_payload:1; /* A pp has > + been set. */ > + > /* This points to the ip_target above if this port isn't on a port set; > otherwise it points to the port set's ips_target. */ > struct ipc_target *ip_cur_target; > @@ -96,6 +100,7 @@ struct ipc_port { > mach_port_msgcount_t ip_msgcount; > mach_port_msgcount_t ip_qlimit; > struct ipc_thread_queue ip_blocked; > + unsigned long ip_protected_payload; > }; Increasing the port structure size by 4 bytes for a single bit is a little frustrating. Instead, how about storing that bit in ip_target.ipt_object.io_bits, right next to IO_BITS_ACTIVE ? -- Richard Braun