Lines Matching refs:aBlock

176 _Block_destructInstance(const void *aBlock __unused)  in _Block_destructInstance()
193 _Block_destructInstance_default(const void *aBlock __unused) in _Block_destructInstance_default()
199 static void (*_Block_destructInstance) (const void *aBlock) = _Block_destructInstance_default;
237 _Block_descriptor_2(struct Block_layout *aBlock)
239 uint8_t *desc = (uint8_t *)_Block_get_descriptor(aBlock);
246 _Block_descriptor_3(struct Block_layout *aBlock) in _Block_descriptor_3() argument
248 uint8_t *desc = (uint8_t *)_Block_get_descriptor(aBlock); in _Block_descriptor_3()
250 if (aBlock->flags & BLOCK_HAS_COPY_DISPOSE) { in _Block_descriptor_3()
257 _Block_call_copy_helper(void *result, struct Block_layout *aBlock) in _Block_call_copy_helper() argument
259 if (auto *pFn = _Block_get_copy_function(aBlock)) { in _Block_call_copy_helper()
260 pFn(result, aBlock); in _Block_call_copy_helper()
265 _Block_call_dispose_helper(struct Block_layout *aBlock) in _Block_call_dispose_helper() argument
267 if (auto *pFn = _Block_get_dispose_function(aBlock)) { in _Block_call_dispose_helper()
268 pFn(aBlock); in _Block_call_dispose_helper()
284 struct Block_layout *aBlock; in _Block_copy() local
291 aBlock = (struct Block_layout *)arg; in _Block_copy()
292 if (aBlock->flags & BLOCK_NEEDS_FREE) { in _Block_copy()
294 latching_incr_int(&aBlock->flags); in _Block_copy()
295 return aBlock; in _Block_copy()
296 } else if (aBlock->flags & BLOCK_IS_GLOBAL) { in _Block_copy()
297 return aBlock; in _Block_copy()
300 size_t size = Block_size(aBlock); in _Block_copy()
302 memmove(result, aBlock, size); // bitcopy first in _Block_copy()
305 result->invoke = aBlock->invoke; in _Block_copy()
310 &aBlock->descriptor, _Block_descriptor_ptrauth_discriminator); in _Block_copy()
316 ptrauth_auth_and_resign(aBlock->descriptor, ptrauth_key_asda, oldDesc, in _Block_copy()
324 _Block_call_copy_helper(result, aBlock); in _Block_copy()
420 struct Block_layout *aBlock = (struct Block_layout *)arg; in _Block_release() local
421 if (!aBlock) { in _Block_release()
424 if (aBlock->flags & BLOCK_IS_GLOBAL) { in _Block_release()
427 if (!(aBlock->flags & BLOCK_NEEDS_FREE)) { in _Block_release()
431 if (latching_decr_int_should_deallocate(&aBlock->flags)) { in _Block_release()
432 _Block_call_dispose_helper(aBlock); in _Block_release()
433 _Block_destructInstance(aBlock); in _Block_release()
434 block_layout_free(aBlock, Block_size(aBlock)); in _Block_release()
441 struct Block_layout *aBlock = (struct Block_layout *)arg; in _Block_tryRetain() local
442 return latching_incr_int_not_deallocating(&aBlock->flags); in _Block_tryRetain()
448 struct Block_layout *aBlock = (struct Block_layout *)arg; in _Block_isDeallocating() local
449 return (aBlock->flags & BLOCK_DEALLOCATING) != 0; in _Block_isDeallocating()
460 Block_size(void *aBlock) in Block_size() argument
462 auto *layout = (Block_layout *)aBlock; in Block_size()
473 _Block_use_stret(void *aBlock) in _Block_use_stret() argument
475 struct Block_layout *layout = (struct Block_layout *)aBlock; in _Block_use_stret()
483 _Block_has_signature(void *aBlock) in _Block_has_signature() argument
485 return _Block_signature(aBlock) ? true : false; in _Block_has_signature()
489 _Block_signature(void *aBlock) in _Block_signature() argument
491 struct Block_layout *layout = (struct Block_layout *)aBlock; in _Block_signature()
508 _Block_layout(void *aBlock) in _Block_layout() argument
511 Block_layout *layout = (Block_layout *)aBlock; in _Block_layout()
529 _Block_extended_layout(void *aBlock) in _Block_extended_layout() argument
532 Block_layout *layout = (Block_layout *)aBlock; in _Block_extended_layout()