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

#include <UsbHub.h>

+ Collaboration diagram for UsbInterruptInHandle:

Public Member Functions

 UsbInterruptInHandle (UsbInterruptInHandle &&other)
 
UsbInterruptInHandleoperator= (UsbInterruptInHandle &&other)
 
MUST_USE_RESULT bool reset ()
 
 operator bool () const
 

Private Member Functions

void adopt (UsbHub *owner, const UsbInterruptInToken &token, void(*callback)(uintptr_t, ssize_t), uintptr_t parameter)
 
 UsbInterruptInHandle (const UsbInterruptInHandle &)=delete
 
UsbInterruptInHandleoperator= (const UsbInterruptInHandle &)=delete
 

Private Attributes

Atomic< UsbHub * > m_Owner
 
Atomic< bool > m_Resetting
 
UsbInterruptInToken m_Token
 
void(* m_Callback )(uintptr_t, ssize_t)
 
uintptr_t m_Parameter
 
bool m_CancellationStarted
 

Friends

class UsbHub
 

Detailed Description

Owns one recurring interrupt-IN subscription.

reset() removes the controller producer and drains every callback captured for this exact subscription generation before returning.

Definition at line 51 of file UsbHub.h.

Constructor & Destructor Documentation

◆ UsbInterruptInHandle() [1/2]

UsbInterruptInHandle::UsbInterruptInHandle ( )

Definition at line 51 of file UsbHub.cc.

◆ UsbInterruptInHandle() [2/2]

UsbInterruptInHandle::UsbInterruptInHandle ( UsbInterruptInHandle &&  other)

Definition at line 59 of file UsbHub.cc.

◆ ~UsbInterruptInHandle()

UsbInterruptInHandle::~UsbInterruptInHandle ( )

Definition at line 74 of file UsbHub.cc.

Member Function Documentation

◆ adopt()

void UsbInterruptInHandle::adopt ( UsbHub owner,
const UsbInterruptInToken token,
void(*)(uintptr_t, ssize_t)  callback,
uintptr_t  parameter 
)
private

Definition at line 127 of file UsbHub.cc.

◆ operator bool()

UsbInterruptInHandle::operator bool ( ) const
inlineexplicit

Definition at line 62 of file UsbHub.h.

◆ operator=()

UsbInterruptInHandle & UsbInterruptInHandle::operator= ( UsbInterruptInHandle &&  other)

Definition at line 79 of file UsbHub.cc.

◆ reset()

bool UsbInterruptInHandle::reset ( )

Returns false when callback context cannot safely wait for cancellation.

Definition at line 98 of file UsbHub.cc.

References Scheduler::instance(), and Scheduler::yield().

Friends And Related Symbol Documentation

◆ UsbHub

friend class UsbHub
friend

Definition at line 67 of file UsbHub.h.

Member Data Documentation

◆ m_Callback

void(* UsbInterruptInHandle::m_Callback) (uintptr_t, ssize_t)
private

Definition at line 78 of file UsbHub.h.

◆ m_CancellationStarted

bool UsbInterruptInHandle::m_CancellationStarted
private

Definition at line 80 of file UsbHub.h.

◆ m_Owner

Atomic<UsbHub*> UsbInterruptInHandle::m_Owner
private

Definition at line 75 of file UsbHub.h.

◆ m_Parameter

uintptr_t UsbInterruptInHandle::m_Parameter
private

Definition at line 79 of file UsbHub.h.

◆ m_Resetting

Atomic<bool> UsbInterruptInHandle::m_Resetting
private

Definition at line 76 of file UsbHub.h.

◆ m_Token

UsbInterruptInToken UsbInterruptInHandle::m_Token
private

Definition at line 77 of file UsbHub.h.


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