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

Lines Matching refs:object

103  *		Take a reference to an object.
108 ipc_object_t object)
110 io_lock(object);
111 assert(object->io_references > 0);
112 io_reference(object);
113 io_unlock(object);
119 * Release a reference to an object.
124 ipc_object_t object)
126 io_lock(object);
127 assert(object->io_references > 0);
128 io_release(object);
129 io_check_unlock(object);
135 * Look up an object in a space.
137 * Nothing locked before. If successful, the object
154 ipc_object_t object;
167 object = entry->ie_object;
168 assert(object != IO_NULL);
170 io_lock(object);
173 *objectp = object;
203 ipc_object_t object;
221 object = entry1->ie_object;
222 assert(object != IO_NULL);
223 io_lock(object);
224 *objectp1 = object;
226 object = entry2->ie_object;
227 assert(object != IO_NULL);
228 io_lock(object);
229 *objectp2 = object;
261 /* null object, MACH_PORT_TYPE_DEAD_NAME, 1 uref */
299 /* null object, MACH_PORT_TYPE_DEAD_NAME, 1 uref */
311 * Allocate an object.
313 * Nothing locked. If successful, the object is returned locked.
314 * The caller doesn't get a reference for the object.
316 * KERN_SUCCESS The object is allocated.
331 ipc_object_t object;
340 object = io_alloc(otype);
341 if (object == IO_NULL)
345 ipc_port_t port = (ipc_port_t)object;
352 ipc_pset_t pset = (ipc_pset_t)object;
357 io_lock_init(object);
358 *namep = (mach_port_name_t)object;
361 io_free(otype, object);
367 entry->ie_object = object;
369 io_lock(object);
372 object->io_references = 1; /* for entry, not caller */
373 object->io_bits = io_makebits(TRUE, otype, 0);
375 *objectp = object;
382 * Allocate an object, with a specific name.
384 * Nothing locked. If successful, the object is returned locked.
385 * The caller doesn't get a reference for the object.
387 * KERN_SUCCESS The object is allocated.
402 ipc_object_t object;
411 object = io_alloc(otype);
412 if (object == IO_NULL)
416 ipc_port_t port = (ipc_port_t)object;
423 ipc_pset_t pset = (ipc_pset_t)object;
428 io_lock_init(object);
431 io_free(otype, object);
437 io_free(otype, object);
442 entry->ie_object = object;
444 io_lock(object);
447 object->io_references = 1; /* for entry, not caller */
448 object->io_bits = io_makebits(TRUE, otype, 0);
450 *objectp = object;
489 * for the resulting object, unless it is IO_DEAD.
493 * KERN_SUCCESS Acquired an object, possibly IO_DEAD.
564 ipc_object_t object,
567 assert(IO_VALID(object));
571 ipc_port_t port = (ipc_port_t) object;
589 ipc_port_t port = (ipc_port_t) object;
602 ipc_port_t port = (ipc_port_t) object;
618 assert(((ipc_port_t)object)->ip_srights);
623 ipc_port_t port = (ipc_port_t) object;
637 assert(((ipc_port_t)object)->ip_sorights);
650 * Consumes a ref for the object.
659 ipc_object_t object,
662 assert(IO_VALID(object));
663 assert(io_otype(object) == IOT_PORT);
667 ipc_port_release_send((ipc_port_t) object);
671 ipc_notify_send_once((ipc_port_t) object);
675 ipc_port_release_receive((ipc_port_t) object);
687 * If successful, consumes a ref for the object.
691 * KERN_SUCCESS Copied out object, consumed ref.
693 * KERN_INVALID_CAPABILITY The object is dead.
703 ipc_object_t object,
712 assert(IO_VALID(object));
713 assert(io_otype(object) == IOT_PORT);
724 ipc_right_reverse(space, object, &name, &entry)) {
725 /* object is locked and active */
731 name = (mach_port_name_t)object;
746 io_lock(object);
747 if (!io_active(object)) {
748 io_unlock(object);
754 entry->ie_object = object;
758 /* space is write-locked and active, object is locked and active */
761 msgt_name, overflow, object);
762 /* object is unlocked */
775 * If successful, consumes a ref for the object.
779 * KERN_SUCCESS Copied out object, consumed ref.
781 * KERN_INVALID_CAPABILITY The object is dead.
792 ipc_object_t object,
802 assert(IO_VALID(object));
803 assert(io_otype(object) == IOT_PORT);
811 ipc_right_reverse(space, object, &oname, &oentry)) {
812 /* object is locked and active */
815 io_unlock(object);
833 io_lock(object);
834 if (!io_active(object)) {
835 io_unlock(object);
841 entry->ie_object = object;
844 /* space is write-locked and active, object is locked and active */
847 msgt_name, overflow, object);
848 /* object is unlocked */
862 * The object is locked and active. Nothing else locked.
863 * The object is unlocked and loses a reference.
869 ipc_object_t object,
875 assert(IO_VALID(object));
876 assert(io_active(object));
878 io_release(object);
881 * If the space is the receiver/owner of the object,
883 * the space's name for the object. Otherwise
889 ipc_port_t port = (ipc_port_t) object;
912 ipc_port_t port = (ipc_port_t) object;
1024 * Check whether the object is a port if so, free it. But
1030 ipc_object_t object)
1035 port = (ipc_port_t) object;
1045 zfree(ipc_object_zones[otype], object);
1059 * Pretty-print an object for kdb.
1108 ipc_object_t object)
1112 iprintf("%s", io_active(object) ? "active" : "dead");
1113 printf(", refs=%d", object->io_references);
1114 printf(", otype=%d", io_otype(object));
1115 kotype = io_kotype(object);
1117 printf(", kotype=%d %s\n", io_kotype(object),
1120 printf(", kotype=0x%x %s\n", io_kotype(object),