• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.5.8/xnu-1228.15.4/osfmk/ipc/

Lines Matching refs:port

78 #include <mach/port.h>
86 #include <ipc/port.h>
345 ipc_port_t port = (ipc_port_t)object;
347 bzero((char *)port, sizeof(*port));
349 mac_port_label_init(&port->ip_label);
416 ipc_port_t port = (ipc_port_t)object;
418 bzero((char *)port, sizeof(*port));
420 mac_port_label_init(&port->ip_label);
545 * The port gains a reference, and a send right
546 * if the port is still active.
549 * The port gains a reference and a send right.
553 * The port gains a reference and a send-once right.
571 ipc_port_t port = (ipc_port_t) object;
573 ip_lock(port);
574 assert(ip_active(port));
575 if (port->ip_destination != IP_NULL) {
576 assert(port->ip_receiver == ipc_space_kernel);
579 ipc_port_set_mscount(port, 0);
581 port->ip_receiver_name = MACH_PORT_NULL;
582 port->ip_destination = IP_NULL;
584 ip_unlock(port);
589 ipc_port_t port = (ipc_port_t) object;
591 ip_lock(port);
592 if (ip_active(port)) {
593 assert(port->ip_srights > 0);
594 port->ip_srights++;
596 ip_reference(port);
597 ip_unlock(port);
602 ipc_port_t port = (ipc_port_t) object;
604 ip_lock(port);
605 assert(ip_active(port));
606 assert(port->ip_receiver_name != MACH_PORT_NULL);
607 assert(port->ip_receiver == ipc_space_kernel);
609 ip_reference(port);
610 port->ip_mscount++;
611 port->ip_srights++;
612 ip_unlock(port);
623 ipc_port_t port = (ipc_port_t) object;
625 ip_lock(port);
626 assert(ip_active(port));
627 assert(port->ip_receiver_name != MACH_PORT_NULL);
629 ip_reference(port);
630 port->ip_sorights++;
631 ip_unlock(port);
859 * The receiver gets his name for the port, if he has receive
889 ipc_port_t port = (ipc_port_t) object;
893 if (port->ip_receiver == space)
894 name = port->ip_receiver_name;
898 assert(port->ip_srights > 0);
899 if (--port->ip_srights == 0 &&
900 port->ip_nsrequest != IP_NULL) {
901 nsrequest = port->ip_nsrequest;
902 port->ip_nsrequest = IP_NULL;
903 mscount = port->ip_mscount;
904 ip_unlock(port);
907 ip_unlock(port);
912 ipc_port_t port = (ipc_port_t) object;
914 assert(port->ip_sorights > 0);
916 if (port->ip_receiver == space) {
919 port->ip_sorights--;
920 name = port->ip_receiver_name;
921 ip_unlock(port);
932 ip_reference(port); /* restore ref */
933 ip_unlock(port);
935 ipc_notify_send_once(port);
999 * Get a label out of a port, to be used by a kernel call
1002 * port.
1004 * The port should be locked for this call. The lock protecting
1012 ipc_port_t port = (ipc_port_t)objp;
1016 if (ip_kotype(port) == IKOT_LABELH)
1017 return &((ipc_labelh_t) port->ip_kobject)->lh_label;
1019 return &port->ip_label;
1024 * Check whether the object is a port if so, free it. But
1032 ipc_port_t port;
1035 port = (ipc_port_t) object;
1037 ipc_port_track_dealloc(port);
1042 mac_port_label_destroy(&port->ip_label);