Top-level kernel facade.
More...
#include <i_kernel.h>
Top-level kernel facade.
Definition at line 75 of file i_kernel.h.
◆ ~IKernel()
| virtual contur::IKernel::~IKernel |
( |
| ) |
|
|
virtualdefault |
◆ createProcess()
Creates and admits a process.
- Parameters
-
| config | Process configuration payload. |
- Returns
- Created process ID or error.
Implemented in contur::Kernel.
◆ enterCritical()
| virtual Result< void > contur::IKernel::enterCritical |
( |
ProcessId | pid, |
|
|
std::string_view | primitiveName ) |
|
nodiscardpure virtual |
Acquires a named synchronization primitive.
Implemented in contur::Kernel.
◆ hasProcess()
| virtual bool contur::IKernel::hasProcess |
( |
ProcessId | pid | ) |
const |
|
nodiscardpure virtualnoexcept |
Returns true when process exists in dispatcher.
Implemented in contur::Kernel.
◆ leaveCritical()
| virtual Result< void > contur::IKernel::leaveCritical |
( |
ProcessId | pid, |
|
|
std::string_view | primitiveName ) |
|
nodiscardpure virtual |
Releases a named synchronization primitive.
Implemented in contur::Kernel.
◆ now()
| virtual Tick contur::IKernel::now |
( |
| ) |
const |
|
nodiscardpure virtualnoexcept |
◆ processCount()
| virtual std::size_t contur::IKernel::processCount |
( |
| ) |
const |
|
nodiscardpure virtualnoexcept |
◆ registerSyncPrimitive()
| virtual Result< void > contur::IKernel::registerSyncPrimitive |
( |
const std::string & | name, |
|
|
std::unique_ptr< ISyncPrimitive > | primitive ) |
|
nodiscardpure virtual |
Registers a named synchronization primitive.
- Parameters
-
| name | Primitive name. |
| primitive | Primitive instance. |
- Returns
- Ok on success or AlreadyExists/InvalidArgument.
Implemented in contur::Kernel.
◆ registerSyscallHandler()
Registers or replaces syscall handler.
- Parameters
-
| id | Syscall identifier. |
| handler | Handler function. |
- Returns
- Ok on success or InvalidArgument.
Implemented in contur::Kernel.
◆ runForTicks()
| virtual Result< void > contur::IKernel::runForTicks |
( |
std::size_t | cycles, |
|
|
std::size_t | tickBudget = 0 ) |
|
nodiscardpure virtual |
Executes multiple dispatch cycles.
- Parameters
-
| cycles | Number of cycles to run. |
| tickBudget | Optional budget per cycle. 0 means kernel default. |
- Returns
- Ok on success or the first non-recoverable error.
Implemented in contur::Kernel.
◆ snapshot()
Returns a snapshot of current kernel state.
Implemented in contur::Kernel.
◆ syscall()
Dispatches a syscall on behalf of a process.
- Parameters
-
| pid | Calling process identifier. |
| id | Syscall identifier. |
| args | Syscall arguments. |
- Returns
- Register-compatible syscall return value.
Implemented in contur::Kernel.
◆ terminateProcess()
Terminates a process immediately.
- Parameters
-
- Returns
- Ok on success or error if process is unknown.
Implemented in contur::Kernel.
◆ tick()
| virtual Result< void > contur::IKernel::tick |
( |
std::size_t | tickBudget = 0 | ) |
|
|
nodiscardpure virtual |
Executes one dispatch cycle.
- Parameters
-
| tickBudget | Optional tick budget. 0 means kernel default. |
- Returns
- Ok on success or error.
Implemented in contur::Kernel.
The documentation for this class was generated from the following file: