Expand description
The concurrency, timing, logging and OS-facing primitives an IOC is built
on — C libCom’s epicsThread / epicsTime / errlog / envDefs half.
§The two backends
task’s spawn/sleep/interval seam has two mutually exclusive backends,
selected by this crate’s build.rs into one cfg rather than repeated as a
target/feature predicate at each of the ~two dozen seam sites:
tokio_backend— the tokio runtime. The hosted default.exec_backend— the std-threadbackgroundexecutor (callback pool + delayed timer + scanOnce worker). Unconditional on RTEMS, which has no tokio reactor, and host-selectable through thertems-exec-modelfeature for a Linux blocking-front-end deployment that wants the same runtime-free backend.
crate::EXEC_BACKEND states which one this build got, so a crate above
can pin its own copy of the predicate to it.
Modules§
- accept
- Backoff for a server accept loop, shared by every accept loop in the workspace.
- background
- RTEMS-side background-execution infrastructure (CA sans-io refactor, increment W3a — the seam backend).
- blocking_
io - Blocking socket ⇄
AsyncRead/AsyncWriteadapters: the byte source for every reactor-free driver in the workspace. - build_
info - The three
EPICS_BUILD_*environment parameters. - env
- EPICS environment parameters — C’s
envSubr.c. - env_
table - EPICS environment parameters — the Rust
envData.c. - epics_
string - C
libComepicsString.c— the escape-translation half. - fs
- Filesystem operations through the runtime seam.
- general_
time - ioc_
role - Which role an IOC thread takes on, and therefore which scheduling band it sits at — the one place that choice is made.
- json_
string - The JSON string decoder a
.dbJSON-brace value goes through — C’s yajl. - log
- Runtime logging —
errlogseverity surface plus thert_*macros. - net
- socket
- Socket construction with pre-bind options: the one place in the workspace that opens a socket, sets the address-reuse/broadcast options a protocol needs, and only then binds or connects it.
- stdlib
- The numeric core of C’s
strtodfor C99 hex floats, shared by everystrtodport in the workspace (calc::engine::strtod, the CALC literal scanner, andepics-ca-rs’sestdlib, the env-knob parser). - supervise
- Auto-restart supervisor — sliding-window NRESTARTS pattern.
- sync
- task
- time
- version
- The EPICS Base release this crate ports — the Rust
epicsVersion.h. - worker_
pool - A bounded set of persistent threads that a connection borrows rather than creates, closing the server-side per-connection thread leak.
Macros§
- select
- Waits on multiple concurrent branches, returning when the first branch completes, cancelling the remaining branches.