← All docs
flock() — internals
Compiler internals for flock(): lowering path, type checks, and runtime helpers.
flock() — internals
Where it lives
- Signature:
src/builtins/io/flock.rs - Lowering:
src/codegen/lower_inst/builtins/io.rs:3305 (lower_flock) - Function symbol:
lower_flock()
Lowering notes
- Lowers
flock(stream, operation, would_block?)through the libc flock wrapper.
Runtime helpers
No direct __rt_* helpers captured — the lowering is inlined or routes through another builtin.
Signature summary
function flock(resource $stream, int $operation, bool $would_block = null): bool
What the type checker enforces
- Arity: takes 2–3 arguments (1 optional).
- By-reference parameters:
$would_block.
Eval interpreter (magician)
- Declaration:
crates/elephc-magician/src/interpreter/builtins/filesystem/flock.rs(eval_builtin!) - Dispatch hooks:
values - By-reference parameters:
$would_block.