The Pedigree Project 0.1
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
LocalApicTimerHandlerSlots Class Reference

#include <LocalApicTimerHandlerSlots.h>

+ Collaboration diagram for LocalApicTimerHandlerSlots:

Public Member Functions

bool registerHandler (ProcessorId processor, SchedulerTimerHandler *handler)
 
bool removeHandler (ProcessorId processor, SchedulerTimerHandler *handler)
 
bool beginDispatch (ProcessorId processor, SchedulerTimerHandlerSlot::DispatchGuard &guard)
 
bool isPublished (ProcessorId processor, SchedulerTimerHandler *handler) const
 

Static Public Attributes

static constexpr size_t Capacity = 256
 

Private Member Functions

 LocalApicTimerHandlerSlots (const LocalApicTimerHandlerSlots &)=delete
 
LocalApicTimerHandlerSlotsoperator= (const LocalApicTimerHandlerSlots &)=delete
 

Private Attributes

SchedulerTimerHandlerSlot m_Handlers [Capacity]
 

Detailed Description

Fixed handler publication slots for the 8-bit xAPIC processor envelope.

Definition at line 16 of file LocalApicTimerHandlerSlots.h.

Constructor & Destructor Documentation

◆ LocalApicTimerHandlerSlots()

LocalApicTimerHandlerSlots::LocalApicTimerHandlerSlots ( )
inline

Definition at line 20 of file LocalApicTimerHandlerSlots.h.

Member Function Documentation

◆ beginDispatch()

bool LocalApicTimerHandlerSlots::beginDispatch ( ProcessorId  processor,
SchedulerTimerHandlerSlot::DispatchGuard guard 
)
inline

Admit one callback on this physical APIC processor and bind its lifetime to the caller's guard. No raw handler pointer escapes the slot.

Definition at line 45 of file LocalApicTimerHandlerSlots.h.

References SchedulerTimerHandlerSlot::beginDispatch().

◆ isPublished()

bool LocalApicTimerHandlerSlots::isPublished ( ProcessorId  processor,
SchedulerTimerHandler handler 
) const
inline

Test/diagnostic predicate which never permits callback dispatch.

Definition at line 52 of file LocalApicTimerHandlerSlots.h.

References SchedulerTimerHandlerSlot::isPublished().

◆ registerHandler()

bool LocalApicTimerHandlerSlots::registerHandler ( ProcessorId  processor,
SchedulerTimerHandler handler 
)
inline

Publish a handler only when the processor slot is currently empty.

Definition at line 23 of file LocalApicTimerHandlerSlots.h.

References SchedulerTimerHandlerSlot::publish().

◆ removeHandler()

bool LocalApicTimerHandlerSlots::removeHandler ( ProcessorId  processor,
SchedulerTimerHandler handler 
)
inline

Unpublish only the exact handler currently owned by this processor. A different processor is rejected before it can close this slot.

Definition at line 34 of file LocalApicTimerHandlerSlots.h.

References SchedulerTimerHandlerSlot::unpublish().

Member Data Documentation

◆ Capacity

constexpr size_t LocalApicTimerHandlerSlots::Capacity = 256
staticconstexpr

Definition at line 18 of file LocalApicTimerHandlerSlots.h.

◆ m_Handlers

SchedulerTimerHandlerSlot LocalApicTimerHandlerSlots::m_Handlers[Capacity]
private

Definition at line 60 of file LocalApicTimerHandlerSlots.h.


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