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

#include <Ps2CaptureState.h>

+ Collaboration diagram for Ps2CaptureQueue:

Public Member Functions

bool tryPush (const Ps2CapturedByte &record)
 
bool hasCapacity () const
 
bool pop (Ps2CapturedByte &record)
 
size_t pending () const
 
void reset ()
 

Static Public Attributes

static constexpr size_t Capacity = 256
 

Private Attributes

Ps2CapturedByte m_Records [Capacity]
 
size_t m_WriteSequence
 
size_t m_ReadSequence
 

Detailed Description

Fixed single-consumer queue for bytes captured by the bounded PS/2 hard stage. Producers are serialised by Ps2IoAdmissionGate before entering here.

Definition at line 56 of file Ps2CaptureState.h.

Constructor & Destructor Documentation

◆ Ps2CaptureQueue()

Ps2CaptureQueue::Ps2CaptureQueue ( )
inline

Definition at line 60 of file Ps2CaptureState.h.

Member Function Documentation

◆ hasCapacity()

bool Ps2CaptureQueue::hasCapacity ( ) const
inline

Safe preflight while the caller still owns the single-producer gate.

Definition at line 75 of file Ps2CaptureState.h.

◆ pending()

size_t Ps2CaptureQueue::pending ( ) const
inline

Definition at line 93 of file Ps2CaptureState.h.

◆ pop()

bool Ps2CaptureQueue::pop ( Ps2CapturedByte record)
inline

Definition at line 81 of file Ps2CaptureState.h.

◆ reset()

void Ps2CaptureQueue::reset ( )
inline

Only reset while IRQ admission and the consumer are stopped.

Definition at line 100 of file Ps2CaptureState.h.

◆ tryPush()

bool Ps2CaptureQueue::tryPush ( const Ps2CapturedByte record)
inline

Definition at line 62 of file Ps2CaptureState.h.

Member Data Documentation

◆ Capacity

constexpr size_t Ps2CaptureQueue::Capacity = 256
staticconstexpr

Definition at line 58 of file Ps2CaptureState.h.

◆ m_ReadSequence

size_t Ps2CaptureQueue::m_ReadSequence
private

Definition at line 108 of file Ps2CaptureState.h.

◆ m_Records

Ps2CapturedByte Ps2CaptureQueue::m_Records[Capacity]
private

Definition at line 106 of file Ps2CaptureState.h.

◆ m_WriteSequence

size_t Ps2CaptureQueue::m_WriteSequence
private

Definition at line 107 of file Ps2CaptureState.h.


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