ReXGlue SDK
Loading...
Searching...
No Matches
rex::kernel::IOCompletionObject Struct Reference

Public Member Functions

void Queue (const IONotification &notification)
bool Wait (u64 wait_ticks, IONotification *out_notification)

Public Attributes

std::mutex notification_lock
std::queue< IONotification > notifications
std::unique_ptr< rex::platform::Semaphore > notification_semaphore

Static Public Attributes

static constexpr u32 kMaxNotifications = 1024

Member Function Documentation

◆ Queue()

void rex::kernel::IOCompletionObject::Queue ( const IONotification & notification)

Queues a notification and wakes one waiter.

◆ Wait()

bool rex::kernel::IOCompletionObject::Wait ( u64 wait_ticks,
IONotification * out_notification )

Waits for a notification and dequeues it.

Parameters
wait_ticksThe timeout in 100 nanosecond ticks, negative for relative.
out_notificationReceives the notification when one arrived.
Returns
True when the wait ended because a notification was received.

Member Data Documentation

◆ kMaxNotifications

u32 rex::kernel::IOCompletionObject::kMaxNotifications = 1024
staticconstexpr

Maximum count of the notification semaphore, so the queue holds at most this many entries.

◆ notification_semaphore

std::unique_ptr<rex::platform::Semaphore> rex::kernel::IOCompletionObject::notification_semaphore

Counts the queued notifications, waited on to receive the next one.

◆ notifications

std::queue<IONotification> rex::kernel::IOCompletionObject::notifications

Completed requests in arrival order, one per release of notification_semaphore.


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