Lines Matching refs:tag
166 void OSMalloc_Tagref(OSMallocTag tag);
167 void OSMalloc_Tagrele(OSMallocTag tag);
591 OSMallocTag tag)
593 if (!((tag->OSMT_state & OSMT_VALID_MASK) == OSMT_VALID))
594 panic("OSMalloc_Tagref(): bad state 0x%08X\n",tag->OSMT_state);
596 (void)hw_atomic_add(&tag->OSMT_refcnt, 1);
601 OSMallocTag tag)
603 if (!((tag->OSMT_state & OSMT_VALID_MASK) == OSMT_VALID))
604 panic("OSMalloc_Tagref(): bad state 0x%08X\n",tag->OSMT_state);
606 if (hw_atomic_sub(&tag->OSMT_refcnt, 1) == 0) {
607 if (hw_compare_and_store(OSMT_VALID|OSMT_RELEASED, OSMT_VALID|OSMT_RELEASED, &tag->OSMT_state)) {
609 (void)remque((queue_entry_t)tag);
611 kfree((void*)tag, sizeof(*tag));
619 OSMallocTag tag)
621 if (!hw_compare_and_store(OSMT_VALID, OSMT_VALID|OSMT_RELEASED, &tag->OSMT_state))
622 panic("OSMalloc_Tagfree(): bad state 0x%08X\n", tag->OSMT_state);
624 if (hw_atomic_sub(&tag->OSMT_refcnt, 1) == 0) {
626 (void)remque((queue_entry_t)tag);
628 kfree((void*)tag, sizeof(*tag));
635 OSMallocTag tag)
640 OSMalloc_Tagref(tag);
641 if ((tag->OSMT_attr & OSMT_PAGEABLE)
650 OSMalloc_Tagrele(tag);
658 OSMallocTag tag)
662 if (tag->OSMT_attr & OSMT_PAGEABLE)
665 OSMalloc_Tagref(tag);
669 OSMalloc_Tagrele(tag);
677 OSMallocTag tag)
681 if (tag->OSMT_attr & OSMT_PAGEABLE)
684 OSMalloc_Tagref(tag);
687 OSMalloc_Tagrele(tag);
696 OSMallocTag tag)
698 if ((tag->OSMT_attr & OSMT_PAGEABLE)
704 OSMalloc_Tagrele(tag);