Epok Engine

PSYQO SDK

psyqo::Kernel::openEvent

Function · 1 overload

Function

A C++ wrapper around the `openEvent` syscall.

Belongs to
psyqo::Kernel
Header
kernel.hh
Overloads
1

Declaration

Declaration
uint32_t openEvent(uint32_t classId, uint32_t spec, uint32_t mode, eastl::function<void()>&& lambda)

A C++ wrapper around the `openEvent` syscall.

ParameterTypeMeaning
classIduint32_tValue supplied for classId. Keep referenced or pointed-to data valid for the complete call.
specuint32_tValue supplied for spec. Keep referenced or pointed-to data valid for the complete call.
modeuint32_tValue supplied for mode. Keep referenced or pointed-to data valid for the complete call.
lambdaeastl::function<void ()> &&Value supplied for lambda. Keep referenced or pointed-to data valid for the complete call.

Returns: uint32_t. Check the value before continuing when it represents success, availability or a resource handle.

Example

C++ example
#include "psyqo/kernel.hh"

// Assume these named values have been initialized with valid data:
// uint32_t classId
// uint32_t spec
// uint32_t mode
// eastl::function<void ()> && lambda

auto result = psyqo::Kernel::openEvent(classId, spec, mode, lambda);

Why use it

It provides direct, allocation-conscious access to PSX kernel ownership, interrupts and low-level services. No exception-based error path is implied by the signature.

Trade-offs and warnings

Pointer/reference arguments are borrowed unless the source contract says otherwise; keep them valid for the complete operation and never assume null is accepted.

Declared in https://github.com/pcsx-redux/nugget/blob/6186b131aacc5853a9161fb076ed34ffe504552d/psyqo/kernel.hh:246

Related members