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

Lines Matching refs:space

94  *		Finds an entry in a space, given the name.
96 * Nothing locked. If successful, the space is write-locked.
99 * KERN_INVALID_TASK The space is dead.
100 * KERN_INVALID_NAME Name doesn't exist in space.
105 ipc_space_t space,
111 assert(space != IS_NULL);
113 is_write_lock(space);
115 if (!space->is_active) {
116 is_write_unlock(space);
120 if ((entry = ipc_entry_lookup(space, name)) == IE_NULL) {
121 is_write_unlock(space);
134 * up under the same space lock.
136 * Nothing locked. If successful, the space is write-locked.
138 * KERN_INVALID_TASK The space is dead.
139 * KERN_INVALID_NAME Name doesn't exist in space.
144 ipc_space_t space,
153 assert(space != IS_NULL);
155 is_write_lock(space);
157 if (!space->is_active) {
158 is_write_unlock(space);
162 if ((entry1 = ipc_entry_lookup(space, name1)) == IE_NULL) {
163 is_write_unlock(space);
166 if ((entry2 = ipc_entry_lookup(space, name2)) == IE_NULL) {
167 is_write_unlock(space);
178 * Translate (space, object) -> (name, entry).
183 * The space must be locked (read or write) and active.
189 ipc_space_t space,
200 assert(space->is_active);
212 if (port->ip_receiver == space) {
216 entry = ipc_entry_lookup(space, name);
227 if (ipc_hash_lookup(space, (ipc_object_t) port, namep, entryp)) {
257 * KERN_INVALID_TASK The space is dead.
258 * KERN_INVALID_NAME Name doesn't exist in space.
269 ipc_space_t space,
282 kr = ipc_right_lookup_write(space, name, &entry);
285 /* space is write-locked and active */
294 if (!ipc_right_check(space, port, name, entry)) {
299 space, port, name, entry);
302 is_write_unlock(space);
316 previous = ipc_right_dncancel_macro(space,
323 is_write_unlock(space);
338 is_write_unlock(space);
364 is_write_unlock(space);
369 is_write_unlock(space);
376 is_write_unlock(space);
393 * The space must be write-locked; the port must be locked.
394 * The port must be active; the space doesn't have to be.
399 __unused ipc_space_t space,
421 * The space is write-locked and active.
427 ipc_space_t space,
432 is_write_unlock(space);
444 * The space is write-locked; the port is not locked.
452 ipc_space_t space,
459 assert(space->is_active);
486 ipc_hash_delete(space, (ipc_object_t)port, name, entry);
519 * Cleans up an entry in a dead space.
523 * The space is dead and unlocked.
528 ipc_space_t space,
538 assert(!space->is_active);
544 * would still work, but dead space refs would accumulate
586 dnrequest = ipc_right_dncancel_macro(space, port,
603 assert(port->ip_receiver == space);
613 assert(port->ip_receiver != space);
635 * Destroys an entry in a space.
637 * The space is write-locked.
638 * The space must be active.
645 ipc_space_t space,
656 assert(space->is_active);
663 ipc_entry_dealloc(space, name, entry);
673 ipc_entry_dealloc(space, name, entry);
694 ipc_hash_delete(space, (ipc_object_t) port,
706 ipc_entry_dealloc(space, name, entry);
711 dnrequest = ipc_right_dncancel_macro(space, port, name, entry);
714 ipc_entry_dealloc(space, name, entry);
729 assert(port->ip_receiver == space);
739 assert(port->ip_receiver != space);
767 * The space is write-locked, and is unlocked upon return.
768 * The space must be active.
776 ipc_space_t space,
788 assert(space->is_active);
799 ipc_entry_dealloc(space, name, entry);
804 is_write_unlock(space);
816 if (ipc_right_check(space, port, name, entry)) {
826 dnrequest = ipc_right_dncancel_macro(space, port, name, entry);
830 ipc_entry_dealloc(space, name, entry);
832 is_write_unlock(space);
853 if (ipc_right_check(space, port, name, entry)) {
871 dnrequest = ipc_right_dncancel_macro(space, port,
873 ipc_hash_delete(space, (ipc_object_t) port,
878 ipc_entry_dealloc(space, name, entry);
885 is_write_unlock(space);
908 assert(port->ip_receiver == space);
926 is_write_unlock(space);
934 is_write_unlock(space);
947 * The space is write-locked, and is unlocked upon return.
948 * The space must be active.
958 ipc_space_t space,
974 * we postpone doing so when we are holding the space lock.
977 assert(space->is_active);
1005 ipc_entry_dealloc(space, name, entry);
1010 is_write_unlock(space);
1035 * until just before dropping the space lock.
1041 assert(port->ip_receiver == space);
1069 dnrequest = ipc_right_dncancel_macro(space, port,
1072 ipc_entry_dealloc(space, name, entry);
1074 is_write_unlock(space);
1096 if (ipc_right_check(space, port, name, entry)) {
1114 dnrequest = ipc_right_dncancel_macro(space, port, name, entry);
1118 ipc_entry_dealloc(space, name, entry);
1120 is_write_unlock(space);
1138 if (!ipc_right_check(space, port, name, entry)) {
1159 ipc_entry_dealloc(space, name, entry);
1164 is_write_unlock(space);
1184 if (ipc_right_check(space, port, name, entry)) {
1213 assert(port->ip_receiver == space);
1223 dnrequest = ipc_right_dncancel_macro(space, port,
1225 ipc_hash_delete(space, (ipc_object_t) port,
1231 ipc_entry_dealloc(space, name, entry);
1238 is_write_unlock(space);
1255 is_write_unlock(space);
1259 is_write_unlock(space);
1263 is_write_unlock(space);
1267 is_write_unlock(space);
1276 * The space is write-locked, and is unlocked upon return
1277 * if the call is unsuccessful. The space must be active.
1279 * KERN_SUCCESS Retrieved info; space still locked.
1284 ipc_space_t space,
1299 if (ipc_right_check(space, port, name, entry)) {
1322 * The space is locked (read or write) and active.
1327 __assert_only ipc_space_t space,
1340 assert(space->is_active);
1457 * Copyin a capability from a space.
1471 * The space is write-locked and active.
1479 ipc_space_t space,
1495 assert(space->is_active);
1510 assert(port->ip_receiver == space);
1544 assert(port->ip_receiver == space);
1578 assert(port->ip_receiver == space);
1597 ipc_hash_insert(space, (ipc_object_t) port,
1604 dnrequest = ipc_right_dncancel_macro(space, port,
1637 if (ipc_right_check(space, port, name, entry)) {
1689 if (ipc_right_check(space, port, name, entry)) {
1719 assert(port->ip_receiver == space);
1728 dnrequest = ipc_right_dncancel_macro(space, port,
1730 ipc_hash_delete(space, (ipc_object_t) port,
1766 if (ipc_right_check(space, port, name, entry)) {
1795 dnrequest = ipc_right_dncancel_macro(space, port, name, entry);
1854 * The space is write-locked and active.
1859 ipc_space_t space,
1870 assert(space->is_active);
1917 (void) ipc_right_check(space, (ipc_port_t) object,
1935 * The space is write-locked and active.
1944 ipc_space_t space,
1959 assert(space->is_active);
1973 if (ipc_right_check(space, port, name, entry)) {
1993 assert(port->ip_receiver == space);
2003 dnrequest = ipc_right_dncancel_macro(space, port,
2008 ipc_hash_delete(space, (ipc_object_t) port,
2032 * Copyout a capability to a space.
2043 * The space is write-locked and active.
2045 * The object is unlocked; the space isn't.
2055 ipc_space_t space,
2084 if (space->is_task) {
2085 tasklabel_lock(space->is_task);
2086 rc = mac_port_check_hold_send_once(&space->is_task->maclabel,
2088 tasklabel_unlock(space->is_task);
2106 if (space->is_task) {
2107 tasklabel_lock(space->is_task);
2108 rc = mac_port_check_hold_send(&space->is_task->maclabel,
2110 tasklabel_unlock(space->is_task);
2159 ipc_hash_insert(space, (ipc_object_t) port,
2174 if (space->is_task) {
2175 tasklabel_lock(space->is_task);
2176 rc = mac_port_check_hold_receive(&space->is_task->maclabel,
2178 tasklabel_unlock(space->is_task);
2188 port->ip_receiver = space;
2202 ipc_hash_delete(space, (ipc_object_t) port,
2231 * The space is write-locked and active.
2233 * the space is unlocked.
2240 ipc_space_t space,
2250 assert(space->is_active);
2267 if (ipc_right_check(space, port, oname, oentry)) {
2299 ipc_hash_delete(space, (ipc_object_t) port, oname, oentry);
2300 ipc_hash_insert(space, (ipc_object_t) port, nname, nentry);
2314 assert(port->ip_receiver == space);
2346 ipc_entry_dealloc(space, oname, oentry);
2347 is_write_unlock(space);