|
ReXGlue SDK
|
#include <rex/kernel/object/kernel_object.h>
Public Member Functions | |
| template<typename T, typename... Args> | |
| KernelObject (std::in_place_type_t< T > tag, Args &&... args) | |
| ~KernelObject () | |
| ObjectType | GetType () const |
Public Attributes | |
| ObjectData | data |
| std::string | name |
| std::vector< X_HANDLE > | handles |
| bool | header_hold = false |
| u32 | pointer_refs = 0 |
| u32 | guest_ptr = 0 |
| bool | owns_guest_block = false |
| std::atomic< bool > | reinit_pending {false} |
| kernel::GuestAddressSpace * | memory = nullptr |
| WorkspaceHeap * | workspace = nullptr |
| PinCount | pins |
| void(*) | destroy (KernelObject *object) noexcept = nullptr |
A kernel object, owned by the table and shared by its handles.
|
inlineexplicit |
Constructs the object around an alternative of ObjectData.
| T | The alternative of ObjectData to construct. |
| tag | Selects T. |
| rex::kernel::KernelObject::~KernelObject | ( | ) |
Frees the guest block the object owns.
|
noexcept |
Frees the object. The owning table sets it.
| u32 rex::kernel::KernelObject::guest_ptr = 0 |
Address of the object body, 0 without a guest block.
| std::vector<X_HANDLE> rex::kernel::KernelObject::handles |
One entry per open, in the order opened.
| bool rex::kernel::KernelObject::header_hold = false |
Held by ResolveObject until ForgetAddress, like a handle.
| std::string rex::kernel::KernelObject::name |
Empty for an unnamed object.
| bool rex::kernel::KernelObject::owns_guest_block = false |
True when the destructor frees the block at guest_ptr.
| PinCount rex::kernel::KernelObject::pins |
Keeps the object alive while a caller uses it.
| u32 rex::kernel::KernelObject::pointer_refs = 0 |
Pointer references, which keep the object without a handle.
| std::atomic<bool> rex::kernel::KernelObject::reinit_pending {false} |
Set when a Ke initializer rewrote the header of an object that owns its block.
| WorkspaceHeap* rex::kernel::KernelObject::workspace = nullptr |
Null for the system heap.