Lines Matching refs:slot

32 static finaliseSlot_ret_t finaliseSlot(cte_t *slot, bool_t exposed);
33 static void emptySlot(cte_t *slot, cap_t cleanupInfo);
34 static exception_t reduceZombie(cte_t *slot, bool_t exposed);
72 destSlot = lu_ret.slot; in decodeCNodeInvocation()
104 srcSlot = lu_ret.slot; in decodeCNodeInvocation()
257 srcSlot = lu_ret.slot; in decodeCNodeInvocation()
263 pivotSlot = lu_ret.slot; in decodeCNodeInvocation()
528 exception_t cteRevoke(cte_t *slot) in cteRevoke() argument
535 for (nextPtr = CTE_PTR(mdb_node_get_mdbNext(slot->cteMDBNode)); in cteRevoke()
536 nextPtr && isMDBParentOf(slot, nextPtr); in cteRevoke()
537 nextPtr = CTE_PTR(mdb_node_get_mdbNext(slot->cteMDBNode))) { in cteRevoke()
552 exception_t cteDelete(cte_t *slot, bool_t exposed) in cteDelete() argument
556 fs_ret = finaliseSlot(slot, exposed); in cteDelete()
562 emptySlot(slot, fs_ret.cleanupInfo); in cteDelete()
567 static void emptySlot(cte_t *slot, cap_t cleanupInfo) in emptySlot() argument
569 if (cap_get_capType(slot->cap) != cap_null_cap) { in emptySlot()
573 mdbNode = slot->cteMDBNode; in emptySlot()
587 slot->cap = cap_null_cap_new(); in emptySlot()
588 slot->cteMDBNode = nullMDBNode; in emptySlot()
594 static inline bool_t CONST capRemovable(cap_t cap, cte_t *slot) in capRemovable() argument
602 return (n == 0 || (n == 1 && slot == z_slot)); in capRemovable()
609 static inline bool_t CONST capCyclicZombie(cap_t cap, cte_t *slot) in capCyclicZombie() argument
612 CTE_PTR(cap_zombie_cap_get_capZombiePtr(cap)) == slot; in capCyclicZombie()
615 static finaliseSlot_ret_t finaliseSlot(cte_t *slot, bool_t immediate) in finaliseSlot() argument
622 while (cap_get_capType(slot->cap) != cap_null_cap) { in finaliseSlot()
623 final = isFinalCapability(slot); in finaliseSlot()
624 fc_ret = finaliseCap(slot->cap, final, false); in finaliseSlot()
626 if (capRemovable(fc_ret.remainder, slot)) { in finaliseSlot()
633 slot->cap = fc_ret.remainder; in finaliseSlot()
635 if (!immediate && capCyclicZombie(fc_ret.remainder, slot)) { in finaliseSlot()
642 status = reduceZombie(slot, immediate); in finaliseSlot()
664 static exception_t reduceZombie(cte_t *slot, bool_t immediate) in reduceZombie() argument
670 assert(cap_get_capType(slot->cap) == cap_zombie_cap); in reduceZombie()
671 ptr = (cte_t *)cap_zombie_cap_get_capZombiePtr(slot->cap); in reduceZombie()
672 n = cap_zombie_cap_get_capZombieNumber(slot->cap); in reduceZombie()
673 type = cap_zombie_cap_get_capZombieType(slot->cap); in reduceZombie()
686 switch (cap_get_capType(slot->cap)) { in reduceZombie()
692 (cte_t *)cap_zombie_cap_get_capZombiePtr(slot->cap); in reduceZombie()
695 cap_zombie_cap_get_capZombieNumber(slot->cap) == n && in reduceZombie()
696 cap_zombie_cap_get_capZombieType(slot->cap) == type) { in reduceZombie()
698 slot->cap = in reduceZombie()
699 cap_zombie_cap_set_capZombieNumber(slot->cap, n - 1); in reduceZombie()
704 assert(ptr2 == slot && ptr != slot); in reduceZombie()
714 assert(ptr != slot); in reduceZombie()
721 capSwapForDelete(ptr, slot); in reduceZombie()
726 void cteDeleteOne(cte_t *slot) in cteDeleteOne() argument
728 word_t cap_type = cap_get_capType(slot->cap); in cteDeleteOne()
736 final = isFinalCapability(slot); in cteDeleteOne()
737 fc_ret = finaliseCap(slot->cap, final, true); in cteDeleteOne()
739 assert(capRemovable(fc_ret.remainder, slot) && in cteDeleteOne()
741 emptySlot(slot, cap_null_cap_new()); in cteDeleteOne()
745 void insertNewCap(cte_t *parent, cte_t *slot, cap_t cap) in insertNewCap() argument
750 slot->cap = cap; in insertNewCap()
751 slot->cteMDBNode = mdb_node_new(CTE_REF(next), true, true, CTE_REF(parent)); in insertNewCap()
753 mdb_node_ptr_set_mdbPrev(&next->cteMDBNode, CTE_REF(slot)); in insertNewCap()
755 mdb_node_ptr_set_mdbNext(&parent->cteMDBNode, CTE_REF(slot)); in insertNewCap()
761 cte_t *slot; in setupReplyMaster() local
763 slot = TCB_PTR_CTE_PTR(thread, tcbReply); in setupReplyMaster()
764 if (cap_get_capType(slot->cap) == cap_null_cap) { in setupReplyMaster()
767 slot->cap = cap_reply_cap_new(true, true, TCB_REF(thread)); in setupReplyMaster()
768 slot->cteMDBNode = nullMDBNode; in setupReplyMaster()
769 mdb_node_ptr_set_mdbRevocable(&slot->cteMDBNode, true); in setupReplyMaster()
770 mdb_node_ptr_set_mdbFirstBadged(&slot->cteMDBNode, true); in setupReplyMaster()
815 exception_t ensureNoChildren(cte_t *slot) in ensureNoChildren() argument
817 if (mdb_node_get_mdbNext(slot->cteMDBNode) != 0) { in ensureNoChildren()
820 next = CTE_PTR(mdb_node_get_mdbNext(slot->cteMDBNode)); in ensureNoChildren()
821 if (isMDBParentOf(slot, next)) { in ensureNoChildren()
830 exception_t ensureEmptySlot(cte_t *slot) in ensureEmptySlot() argument
832 if (cap_get_capType(slot->cap) != cap_null_cap) { in ensureEmptySlot()
870 bool_t PURE slotCapLongRunningDelete(cte_t *slot) in slotCapLongRunningDelete() argument
872 if (cap_get_capType(slot->cap) == cap_null_cap) { in slotCapLongRunningDelete()
874 } else if (! isFinalCapability(slot)) { in slotCapLongRunningDelete()
877 switch (cap_get_capType(slot->cap)) { in slotCapLongRunningDelete()
895 cte_t *slot; in getReceiveSlots() local
915 slot = lus_ret.slot; in getReceiveSlots()
917 if (cap_get_capType(slot->cap) != cap_null_cap) { in getReceiveSlots()
921 return slot; in getReceiveSlots()