Interface CALL_IORQ

Preprocessor macro expanding to a command

SpaceUser/kernel
ContextSync/async
May blockNo
SPLAny
Dynamic memoryNo

#include <SPAD/AC.H>

CALL_IORQ(iorq, handler);

Description

This is a preprocessor macro that expands to machine- and compiler-dependent code to call an IORQ. If the current SPL is lower than IORQ handler's SPL, the handler is executed immediatelly, otherwise the IORQ is queued. IORQ posted with this function may be canceled with KERNEL$CIO function, however, after cancel, the caller must still wait for AST to arrive. After the AST arrives, he may free or reuse the structure.

Arguments

Implementation note

IORQs on the same SPL are called in the same order they were queued, but the programmer must not depend on it for correctness. The programmer may depend on this feature for good performance (for example networking packets are queued with this call — the protocols are required to handle out-of-order packets correctly, altough it causes performance degradation).

See also

DECL_AST, DECL_IOCALL, CALL_IORQ_EXPR, KERNEL$SPL