Lines Matching refs:space
102 * Function versions of the IPC space macros.
109 ipc_space_t space)
111 ipc_space_reference_macro(space);
116 ipc_space_t space)
118 ipc_space_release_macro(space);
124 * Creates a new IPC space.
126 * The new space has two references, one for the caller
131 * KERN_SUCCESS Created a space.
140 ipc_space_t space;
145 space = is_alloc();
146 if (space == IS_NULL)
151 is_free(space);
172 is_ref_lock_init(space);
173 space->is_references = 2;
175 is_lock_init(space);
176 space->is_active = TRUE;
177 space->is_growing = FALSE;
178 space->is_table = table;
179 space->is_table_size = new_size;
180 space->is_table_next = initial+1;
182 ipc_splay_tree_init(&space->is_tree);
183 space->is_tree_total = 0;
184 space->is_tree_small = 0;
185 space->is_tree_hash = 0;
186 space->is_task = NULL;
188 *spacep = space;
195 * Create a special space. A special space
203 * KERN_SUCCESS Created a space.
211 ipc_space_t space;
213 space = is_alloc();
214 if (space == IS_NULL)
217 is_ref_lock_init(space);
218 space->is_references = 1;
220 is_lock_init(space);
221 space->is_active = FALSE;
223 *spacep = space;
228 * ipc_space_clean - remove all port references from an ipc space.
231 * will not destroy the entire port table of a shared space. Instead
232 * it will simply clear its own sub-space.
236 ipc_space_t space)
246 * out the space died.
248 is_write_lock(space);
249 while (space->is_growing)
250 is_write_sleep(space);
256 if (space == default_pager_space)
260 table = space->is_table;
261 size = space->is_table_size;
271 ipc_right_destroy(space, name, entry);
281 for (tentry = ipc_splay_traverse_start(&space->is_tree);
283 tentry = ipc_splay_traverse_next(&space->is_tree, TRUE)) {
293 ipc_splay_traverse_finish(&space->is_tree);
294 ipc_right_destroy(space, name, &tentry->ite_entry);
298 ipc_splay_traverse_finish(&space->is_tree);
299 is_write_unlock(space);
306 * Marks the space as dead and cleans up the entries.
307 * Does nothing if the space is already dead.
314 ipc_space_t space)
322 assert(space != IS_NULL);
324 is_write_lock(space);
325 active = space->is_active;
326 space->is_active = FALSE;
327 is_write_unlock(space);
336 * out the space died.
338 is_read_lock(space);
339 while (space->is_growing)
340 is_read_sleep(space);
342 is_read_unlock(space);
347 if (space == default_pager_space)
351 table = space->is_table;
352 size = space->is_table_size;
364 ipc_right_clean(space, name, entry);
368 it_entries_free(space->is_table_next-1, table);
369 space->is_table_size = 0;
371 for (tentry = ipc_splay_traverse_start(&space->is_tree);
373 tentry = ipc_splay_traverse_next(&space->is_tree, TRUE)) {
380 ipc_right_clean(space, name, &tentry->ite_entry);
383 ipc_hash_global_delete(space, tentry->ite_object,
386 ipc_splay_traverse_finish(&space->is_tree);
389 * Because the space is now dead,
393 is_release(space);