Epok Engine

EPOK RUNTIME

epok::sequence::valid_event

Function · 1 overload

Function

Performs `valid event` as part of PSX kernel ownership, interrupts and low-level services.

Belongs to
epok::sequence
Header
sequence_kernel.hpp
Overloads
1

Declaration

Declaration
inline bool valid_event(const Event& e, bool extended = true)

Performs `valid event` as part of PSX kernel ownership, interrupts and low-level services.

ParameterTypeMeaning
econst Event &Value supplied for e. Keep referenced or pointed-to data valid for the complete call.
extendedboolValue supplied for extended. Keep referenced or pointed-to data valid for the complete call.

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

Example

C++ example
#include "sequence_kernel.hpp"

// Assume these named values have been initialized with valid data:
// const Event & e
// bool extended

auto result = epok::sequence::valid_event(e, extended);

Why use it

The boolean result makes success, availability or state explicit without exceptions.

Trade-offs and warnings

Check the return value; `false` is part of normal control flow for many PSX resource operations. 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 runtime/sequence_kernel.hpp:53

Related members