• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/xnu-2422.115.4/osfmk/kern/

Lines Matching refs:port

42  * 				the new port.
43 * *sessionport Pointer to the current session port. This may
47 * NULL Failed to allocate port (due to lack of memory
51 * If there were no outstanding send rights against the port,
55 * the port's reference until all send rights go away.
61 ipc_port_t port;
64 * If we don't have an existing session port, then create one.
66 port = *sessionport;
67 if (!IP_VALID(port)) {
72 if (!OSCompareAndSwapPtr(port, new_port, sessionport))
74 port = *sessionport;
77 assert(ip_active(port) && IKOT_AU_SESSIONPORT == ip_kotype(port));
78 sendport = ipc_port_make_send(port);
82 * the port, take a reference on the session and request one.
84 if (IP_NULL == port->ip_nsrequest) {
90 ip_lock(port);
92 notifyport = ipc_port_make_sonce_locked(port);
94 ipc_port_nsrequest(port, port->ip_mscount, notifyport, &notifyport);
95 /* port unlocked */
111 * Description: Obtain the audit session info associated with the given port.
113 * Parameters: port A Mach port.
115 * Returns: NULL The given Mach port did not reference audit
118 * the Mach port.
123 audit_session_porttoaia(ipc_port_t port)
127 if (IP_VALID(port)) {
128 ip_lock(port);
129 if (IKOT_AU_SESSIONPORT == ip_kotype(port)) {
130 assert(ip_active(port));
131 aia_p = (struct auditinfo_addr *)port->ip_kobject;
133 ip_unlock(port);
149 * We check the port's mscount against the notification's not_count
153 * In the normal case (no new senders), we first mark the port
163 ipc_port_t port = notification->not_header.msgh_remote_port;
167 assert(IKOT_AU_SESSIONPORT == ip_kotype(port));
168 ip_lock(port);
169 assert(ip_active(port));
170 port_aia_p = (struct auditinfo_addr *)port->ip_kobject;
177 if (port->ip_mscount > notification->not_count) {
178 notifyport = ipc_port_make_sonce_locked(port);
179 ipc_port_nsrequest(port, port->ip_mscount, notifyport, &notifyport);
180 /* port unlocked */
194 ip_unlock(port);
201 ipc_port_t port = *sessionport;
203 if (IP_VALID(port)) {
204 assert (ip_active(port));
205 assert(IKOT_AU_SESSIONPORT == ip_kotype(port));
206 ipc_kobject_set_atomically(port, IKO_NULL, IKOT_NONE);
207 ipc_port_dealloc_kernel(port);