Expand description
Runtime-neutral services required by HiSilicon radio firmware.
This crate is the narrow dependency shared by radio adapters and an RTOS.
It does not implement a scheduler and does not know about a chip, protocol,
vendor blob, allocator, or network stack. A firmware installs exactly one
Runtime before initializing its radio controller.
Modules§
- conformance
- Runtime-neutral executable semantics for radio backends.
Structs§
- Invalid
Task Priority - A numeric priority outside the contract-v1 range.
- Mutex
Handle - Opaque recursive-mutex identity owned by the installed runtime.
- Runtime
Capabilities - Runtime capabilities advertised before a radio adapter starts.
- Runtime
Contract - Versioned capabilities offered by one runtime backend.
- Runtime
Contract Version - Version of the runtime-neutral radio contract.
- Runtime
Execution Modes - Scheduling modes a runtime can execute with its installed target support.
- Runtime
Execution Profile - Versioned scheduling guarantees offered by one installed runtime.
- Runtime
Requirements - Versioned semantic and execution requirements of one radio adapter.
- Semaphore
- Runtime-neutral counting semaphore suitable for static or embedded use.
- Semaphore
Handle - Opaque semaphore identity owned by the installed runtime.
- Task
Budget - Periodic CPU quota for one runtime task, expressed in milliseconds.
- Task
Capacity - Snapshot of dynamic task slots owned by the installed runtime.
- Task
Config - A task’s scheduling parameters.
- TaskId
- Opaque task identity owned by the installed runtime.
- Task
Priority - A validated runtime task priority.
- Task
Reservation - Opaque owner-bound reservation for dynamic task slots.
- Task
Reservation Batch - Owner-bound reservations returned by one atomic resource-plan admission.
- Task
Resource Group Requirements - One independently owned task group within an atomic resource plan.
- Task
Resource Owner - Stable, runtime-opaque identity for one task-resource owner.
- Task
Resource Plan - Checked, heterogeneous task-resource plan admitted as one transaction.
- Task
Resource Requirements - Atomic task-slot and stack-memory requirements for one subsystem owner.
Enums§
- Error
- Runtime service failure.
- Task
Admission Error - Failure to satisfy task-resource admission.
- Task
Execution Policy - Execution policy assigned atomically when a runtime task is created.
- Wait
Cancellation Outcome - Result of cancelling a task’s pending synchronization wait.
- Wait
Outcome - Result of a successful wait operation.
- Wait
Timeout - A bounded or unbounded wait request.
Constants§
- TASK_
PRIORITY_ LEVELS - Number of priority levels required by runtime contract v1.
- TASK_
RESOURCE_ GROUP_ CAPACITY - Maximum number of independently owned task groups admitted atomically.
Traits§
- Runtime
- Scheduler and synchronization capabilities consumed by a radio adapter.
Functions§
- cancel_
wait - Cancels a live task’s queued synchronization wait or pending direct grant.
- current_
task - Returns the current task identity.
- install
- Installs the firmware’s sole runtime implementation.
- interrupt_
enter - Marks entry into an interrupt handler through the installed runtime.
- interrupt_
exit - Marks exit from an interrupt handler through the installed runtime.
- lock_
scheduler - Prevents scheduler-driven preemption of the current task.
- mutex_
create - Allocates a recursive priority-inheritance mutex.
- mutex_
destroy ⚠ - Destroys a mutex through the installed runtime.
- mutex_
lock - Acquires a mutex through the installed runtime.
- mutex_
unlock - Releases one mutex recursion level through the installed runtime.
- release_
task_ reservation - Releases the unconsumed portion of a task reservation.
- require_
runtime - Proves both semantic capabilities and executable scheduling guarantees.
- require_
runtime_ contract - Proves that the installed backend satisfies an adapter’s requirements.
- require_
task_ capacity - Checks whether a capacity snapshot can accommodate
requiredtasks. - reserve_
task_ capacity - Atomically reserves
requireddynamic slots before radio initialization. - reserve_
task_ resource_ plan - Atomically reserves all independently owned groups in
plan. - reserve_
task_ resources - Atomically reserves dynamic task slots and one stack allocation per slot.
- runtime_
contract - Returns the installed runtime’s versioned contract.
- runtime_
execution_ profile - Returns scheduling guarantees backed by the installed target resources.
- semaphore_
create - Allocates a semaphore through the installed runtime.
- semaphore_
destroy ⚠ - Destroys a semaphore through the installed runtime.
- semaphore_
down - Waits on a semaphore through the installed runtime.
- semaphore_
up - Releases a semaphore through the installed runtime.
- set_
task_ priority - Changes a task’s scheduling priority through the installed runtime.
- sleep_
ms - Sleeps through the installed runtime. A zero duration is represented by
yield_nowinstead of an invalid sleep request. - spawn
- Spawns a task through the installed runtime.
- spawn_
reserved - Spawns a task while consuming one slot from an owner-bound reservation.
- spawn_
reserved_ scheduled - Spawns a reserved task with an explicit execution policy assigned atomically.
- spawn_
scheduled - Spawns a task with an explicit execution policy assigned atomically.
- task_
capacity - Returns an advisory snapshot of the installed runtime’s dynamic task slots.
- unlock_
scheduler - Releases one scheduler-lock nesting level for the current task.
- yield_
now - Yields through the installed runtime.
Type Aliases§
- Task
Entry - Entry point used by a vendor-compatible task.