13 typedef struct WaitableMethods WaitableMethods;
22 const WaitableMethods* vt;
29 WaiterType_HandleWithClear,
49 wait_obj.type = WaiterType_Handle;
82 #define waitMulti(idx_out, timeout, ...) ({ \
83 Waiter __objects[] = { __VA_ARGS__ }; \
84 waitObjects((idx_out), __objects, sizeof(__objects) / sizeof(Waiter), (timeout)); \
93 #define waitMultiHandle(idx_out, timeout, ...) ({ \
94 Handle __handles[] = { __VA_ARGS__ }; \
95 waitHandles((idx_out), __handles, sizeof(__handles) / sizeof(Handle), (timeout)); \
Mutex synchronization primitive.
_LOCK_T Mutex
Mutex datatype, defined in newlib.
Definition: mutex.h:12
Waiter structure, representing any generic waitable synchronization object; both kernel-mode and user...
Definition: wait.h:36
uint64_t u64
64-bit unsigned integer.
Definition: types.h:22
u32 Handle
Kernel object handle.
Definition: types.h:43
u32 Result
Function error code result type.
Definition: types.h:44
int32_t s32
32-bit signed integer.
Definition: types.h:27
Result waitHandles(s32 *idx_out, const Handle *handles, s32 num_handles, u64 timeout)
Waits for an arbitrary number of kernel synchronization objects, optionally with a timeout.
Result waitObjects(s32 *idx_out, const Waiter *objects, s32 num_objects, u64 timeout)
Waits for an arbitrary number of generic waitable synchronization objects, optionally with a timeout.
static Result waitSingle(Waiter w, u64 timeout)
Waits on a single generic waitable synchronization object, optionally with a timeout.
Definition: wait.h:103
static Waiter waiterForHandle(Handle h)
Creates a Waiter for a kernel-mode Handle.
Definition: wait.h:46
static Result waitSingleHandle(Handle h, u64 timeout)
Waits for a single kernel synchronization object, optionally with a timeout.
Definition: wait.h:114