Lines Matching defs:entry

86  *		Searches for an entry, given its name.
98 ipc_entry_t entry;
105 entry = &space->is_table[index];
106 if (IE_BITS_GEN(entry->ie_bits) != MACH_PORT_GEN(name) ||
107 IE_BITS_TYPE(entry->ie_bits) == MACH_PORT_TYPE_NONE)
108 entry = IE_NULL;
111 entry = IE_NULL;
114 assert((entry == IE_NULL) || IE_BITS_TYPE(entry->ie_bits));
115 return entry;
121 * Tries to allocate an entry out of the space.
126 * KERN_SUCCESS A free entry was found.
127 * KERN_NO_SPACE No entry allocated.
155 * Initialize the new entry. We need only
186 * Allocate an entry out of the space.
191 * KERN_SUCCESS An entry was allocated.
193 * KERN_NO_SPACE No room for an entry in the space.
194 * KERN_RESOURCE_SHORTAGE Couldn't allocate memory for an entry.
226 * Allocates/finds an entry with a specific name.
227 * If an existing entry is returned, its type will be nonzero.
232 * KERN_SUCCESS Found existing entry with same name.
233 * KERN_SUCCESS Allocated a new entry.
254 ipc_entry_t entry;
264 * 1) The entry is reserved (index 0)
265 * 2) The entry is inuse, for the same name
266 * 3) The entry is inuse, for a different name
267 * 4) The entry is free
274 entry = &table[index];
277 /* case #1 - the entry is reserved */
278 assert(!IE_BITS_TYPE(entry->ie_bits));
279 assert(!IE_BITS_GEN(entry->ie_bits));
282 } else if (IE_BITS_TYPE(entry->ie_bits)) {
283 if (IE_BITS_GEN(entry->ie_bits) == gen) {
284 /* case #2 -- the entry is inuse, for the same name */
285 *entryp = entry;
288 /* case #3 -- the entry is inuse, for a different name. */
297 * case #4 -- the entry is free
298 * Rip the entry out of the free list.
310 /* mark the previous entry modified - reconstructing the name */
316 entry->ie_bits = gen;
317 entry->ie_request = IE_REQ_NONE;
318 *entryp = entry;
320 assert(entry->ie_object == IO_NULL);
345 * Deallocates an entry from a space.
355 ipc_entry_t entry)
362 assert(entry->ie_object == IO_NULL);
363 assert(entry->ie_request == IE_REQ_NONE);
366 if (entry->ie_request != IE_REQ_NONE)
374 if ((index < size) && (entry == &table[index])) {
375 assert(IE_BITS_GEN(entry->ie_bits) == MACH_PORT_GEN(name));
376 entry->ie_bits &= IE_BITS_GEN_MASK;
377 entry->ie_next = table->ie_next;
381 * Nothing to do. The entry does not match
385 assert(entry == &table[index]);
386 assert(IE_BITS_GEN(entry->ie_bits) == MACH_PORT_GEN(name));
388 ipc_entry_modified(space, name, entry);
394 * Note that an entry was modified in a space.
405 __assert_only ipc_entry_t entry)
416 assert(entry == &table[index]);
489 * we can identify the current size entry.
497 * size, then search for the next entry.
569 * have to take action on. For each entry, take a snapshot of the
570 * corresponding entry in the old table (so it won't change
576 ipc_entry_t entry = &table[i];
579 if (entry->ie_object != osnap.ie_object ||
580 IE_BITS_TYPE(entry->ie_bits) != IE_BITS_TYPE(osnap.ie_bits)) {
582 if (entry->ie_object != IO_NULL &&
583 IE_BITS_TYPE(entry->ie_bits) == MACH_PORT_TYPE_SEND)
584 ipc_hash_table_delete(table, size, entry->ie_object, i, entry);
586 entry->ie_object = osnap.ie_object;
587 entry->ie_bits = osnap.ie_bits;
588 entry->ie_request = osnap.ie_request; /* or ie_next */
590 if (entry->ie_object != IO_NULL &&
591 IE_BITS_TYPE(entry->ie_bits) == MACH_PORT_TYPE_SEND)
592 ipc_hash_table_insert(table, size, entry->ie_object, i, entry);
594 assert(entry->ie_object == osnap.ie_object);
595 entry->ie_bits = osnap.ie_bits;
596 entry->ie_request = osnap.ie_request; /* or ie_next */