ReXGlue SDK
Loading...
Searching...
No Matches
rex::kernel::PinCount Class Reference

#include <rex/kernel/object/object.h>

Public Member Functions

void Pin () noexcept
bool Unpin () noexcept
bool Retire () noexcept
u32 GetPins () const noexcept

Detailed Description

Counts transient pins on a KernelObject and decides who destroys it. The destroyer is whichever of the final Retire and the last Unpin happens second.

Member Function Documentation

◆ GetPins()

u32 rex::kernel::PinCount::GetPins ( ) const
inlinenodiscardnoexcept

Returns the live pin count, without the retired bit.

◆ Retire()

bool rex::kernel::PinCount::Retire ( )
inlinenodiscardnoexcept

Marks the owner retired.

Returns
True when no pin is held and the caller must destroy the owner.

◆ Unpin()

bool rex::kernel::PinCount::Unpin ( )
inlinenodiscardnoexcept

Removes a pin.

Returns
True when the caller must destroy the owner.

The documentation for this class was generated from the following file: