Blocking syscalls park the calling fiber
Platform spec ADR
Blocking syscalls park the calling fiber
Spec standingStandard
- Contracts and edge cases MUST rules for panic divergence, syscall parameters, and backend neutrality.
- Design model Panic termination, syscall ownership, and runtime-mediated IO boundaries.
- Examples Panic from lowering, syscall_write status codes, and corelib IO scenarios.
- FAQ and troubleshooting Panic vs Option, syscall return codes, and fiber/blocking IO issues.
- Flow and algorithm Panic emission, syscall_write chunking, and blocking IO on fibers.
- Verification and traceability panic_io implementation paths, e2e runtime cases, and IO contract cross-tests.
0 revisions (git unavailable at build; counts may be empty)
No commits recorded for this path.
| Section id | Required | Found |
|---|---|---|
what-this-feature-specifies | yes | yes |
implementation-anchors | yes | yes |
Full tree: run pnpm verify:platform-spec-layout (writes src/generated/platform-spec-layout-report.json).
Context
Section titled “Context”Blocking read/write on a fiber must not freeze the entire M:N scheduler or violate Phase A mutator rules on pool threads.
Decision
Section titled “Decision”| Rule | Detail |
|---|---|
| Blocking path | Enqueue host blocking work on syscall pool; park current fiber only |
| Wake | Resume fiber on scheduler thread when worker completes |
| Pool workers | Must not execute generated Beskid mutator code or allocate as mutators |
| Pool worker tagging | Each pool thread calls set_syscall_pool_worker() so the runtime can assert this rule (assert_mutator_allowed) and panic on accidental allocation |
| Allocation | Runtime object creation for results happens after resume on scheduler thread |
| Console | Producers Send bytes/events; consumers Receive on fibers |
Consequences
Section titled “Consequences”M6+ syscall integration is required for conformance on blocking builtins.
Verification anchors
Section titled “Verification anchors”Scheduler run_blocking; fiber scheduler verification article.