ReXGlue SDK
Toggle main menu visibility
Loading...
Searching...
No Matches
io_completion_object.h
Go to the documentation of this file.
1
17
18
#pragma once
19
20
#include <memory>
21
#include <mutex>
22
#include <queue>
23
24
#include <
rex/assert.h
>
25
#include <
rex/kernel/object/object.h
>
26
#include <
rex/kernel/types/list.h
>
27
#include <
rex/kernel/types/memory.h
>
28
#include <
rex/kernel/types/status.h
>
29
#include <
rex/kernel/types/thread.h
>
30
#include <
rex/module.h
>
31
#include <
rex/platform.h
>
32
#include <
rex/platform/sync.h
>
33
#include <
rex/platform/thread.h
>
34
#include <
rex/platform/timer.h
>
35
#include <
rex/result.h
>
36
#include <
rex/types.h
>
37
#include <
rex/utility.h
>
38
39
namespace
rex::kernel
{
40
42
struct
IONotification
{
43
u32
key
;
44
u32
apc_context
;
45
u32
status
;
46
u32 num_bytes;
47
};
48
49
struct
IOCompletionObject {
51
static
constexpr
u32
kMaxNotifications
= 1024;
52
53
REX_KERNEL_API
IOCompletionObject();
54
55
std::mutex notification_lock;
57
std::queue<IONotification>
notifications
;
59
std::unique_ptr<rex::platform::Semaphore>
notification_semaphore
;
60
62
REX_KERNEL_API
void
Queue
(
const
IONotification
& notification);
63
71
REX_KERNEL_API
bool
Wait
(u64 wait_ticks,
IONotification
* out_notification);
72
};
73
74
}
// namespace rex::kernel
assert.h
memory.h
Virtual memory flags and typed guest pointers.
thread.h
list.h
Guest list and spin lock structures.
module.h
Interfaces, factory and module declaration.
rex::kernel
Definition
export.h:24
object.h
thread.h
platform.h
Platform flags, packing macros and export markers.
REX_KERNEL_API
#define REX_KERNEL_API
Definition
platform.h:297
result.h
status.h
rex::kernel::IOCompletionObject::notifications
std::queue< IONotification > notifications
Definition
io_completion_object.h:57
rex::kernel::IOCompletionObject::notification_semaphore
std::unique_ptr< rex::platform::Semaphore > notification_semaphore
Definition
io_completion_object.h:59
rex::kernel::IOCompletionObject::Queue
void Queue(const IONotification ¬ification)
rex::kernel::IOCompletionObject::kMaxNotifications
static constexpr u32 kMaxNotifications
Definition
io_completion_object.h:51
rex::kernel::IOCompletionObject::Wait
bool Wait(u64 wait_ticks, IONotification *out_notification)
rex::kernel::IONotification
Definition
io_completion_object.h:42
rex::kernel::IONotification::apc_context
u32 apc_context
Definition
io_completion_object.h:44
rex::kernel::IONotification::key
u32 key
Definition
io_completion_object.h:43
rex::kernel::IONotification::status
u32 status
Definition
io_completion_object.h:45
sync.h
Wait objects and wait functions.
timer.h
types.h
Integer types, byte order wrappers and size literals.
utility.h
Move only function, const propagating pointer and scope guard.
rex
kernel
object
io_completion_object.h
Generated by
1.18.0