Lines Matching refs:is
37 * documentation is hereby granted, provided that both the copyright
59 * is included in support of clause 2.2 (b) of the Apple Public License,
105 * unaffected while the grow operation is underway.
110 #define IS_INACTIVE 0x40000000 /* space is inactive */
111 #define IS_GROWING 0x20000000 /* space is growing */
126 #define is_active(is) (((is)->is_bits & IS_INACTIVE) != IS_INACTIVE)
129 is_mark_inactive(ipc_space_t is)
131 assert(is_active(is));
132 OSBitOrAtomic(IS_INACTIVE, &is->is_bits);
135 #define is_growing(is) (((is)->is_bits & IS_GROWING) == IS_GROWING)
138 is_start_growing(ipc_space_t is)
140 assert(!is_growing(is));
141 OSBitOrAtomic(IS_GROWING, &is->is_bits);
145 is_done_growing(ipc_space_t is)
147 assert(is_growing(is));
148 OSBitAndAtomic(~IS_GROWING, &is->is_bits);
154 #define is_free(is) zfree(ipc_space_zone, (is))
168 #define is_lock_init(is) lck_spin_init(&(is)->is_lock_data, &ipc_lck_grp, &ipc_lck_attr)
169 #define is_lock_destroy(is) lck_spin_destroy(&(is)->is_lock_data, &ipc_lck_grp)
171 #define is_read_lock(is) lck_spin_lock(&(is)->is_lock_data)
172 #define is_read_unlock(is) lck_spin_unlock(&(is)->is_lock_data)
173 #define is_read_sleep(is) lck_spin_sleep(&(is)->is_lock_data, \
175 (event_t)(is), \
178 #define is_write_lock(is) lck_spin_lock(&(is)->is_lock_data)
179 #define is_write_lock_try(is) lck_spin_try_lock(&(is)->is_lock_data)
180 #define is_write_unlock(is) lck_spin_unlock(&(is)->is_lock_data)
181 #define is_write_sleep(is) lck_spin_sleep(&(is)->is_lock_data, \
183 (event_t)(is), \
186 #define is_refs(is) ((is)->is_bits & IS_REFS_MAX)
189 is_reference(ipc_space_t is)
191 assert(is_refs(is) > 0 && is_refs(is) < IS_REFS_MAX);
192 OSIncrementAtomic(&(is->is_bits));
197 is_release(ipc_space_t is) {
198 assert(is_refs(is) > 0);
201 if ( 1 == (OSDecrementAtomic(&(is->is_bits)) & IS_REFS_MAX)) {
202 is_lock_destroy(is);
203 is_free(is);