contur2
Loading...
Searching...
No Matches
i_execution_engine.h
Go to the documentation of this file.
1
7
8
#pragma once
9
10
#include <cstddef>
11
#include <string_view>
12
13
#include "
contur/core/types.h
"
14
15
#include "
contur/execution/execution_context.h
"
16
17
namespace
contur
{
18
19
class
ProcessImage
;
20
33
class
IExecutionEngine
34
{
35
public
:
36
virtual
~IExecutionEngine
() =
default
;
37
48
[[nodiscard]]
virtual
ExecutionResult
execute
(
ProcessImage
&process, std::size_t tickBudget) = 0;
49
52
virtual
void
halt
(
ProcessId
pid) = 0;
53
56
[[nodiscard]]
virtual
std::string_view
name
() const noexcept = 0;
57
58
protected:
59
IExecutionEngine
() = default;
60
IExecutionEngine
(const
IExecutionEngine
&) = default;
61
IExecutionEngine
&operator=(const
IExecutionEngine
&) = default;
62
IExecutionEngine
(
IExecutionEngine
&&) = default;
63
IExecutionEngine
&operator=(
IExecutionEngine
&&) = default;
64
};
65
66
}
// namespace contur
contur::IExecutionEngine::IExecutionEngine
IExecutionEngine()=default
contur::IExecutionEngine::execute
virtual ExecutionResult execute(ProcessImage &process, std::size_t tickBudget)=0
Executes the given process for up to tickBudget ticks.
contur::IExecutionEngine::halt
virtual void halt(ProcessId pid)=0
Forcibly halts execution of the given process.
contur::IExecutionEngine::~IExecutionEngine
virtual ~IExecutionEngine()=default
contur::IExecutionEngine::name
virtual std::string_view name() const noexcept=0
Returns the human-readable name of this engine.
contur::ProcessImage
Full in-memory representation of a process.
Definition
process_image.h:36
execution_context.h
ExecutionResult and related types for execution engine outcomes.
contur
Definition
block.h:15
contur::ProcessId
std::uint32_t ProcessId
Unique identifier for a process.
Definition
types.h:12
contur::ExecutionResult
Result of an execution burst returned by IExecutionEngine::execute().
Definition
execution_context.h:37
types.h
Common type aliases, sentinel constants, and forward declarations used throughout the Contur 2 kernel...
include
contur
execution
i_execution_engine.h
Generated by
1.16.1