contur2
Loading...
Searching...
No Matches
syscall_handler.h
Go to the documentation of this file.
1
3
4#pragma once
5
6#include <span>
7
8#include "contur/core/error.h"
9#include "contur/core/types.h"
10
12
13namespace contur {
14
15 class ProcessImage;
16
22 {
23 public:
24 virtual ~ISyscallHandler() = default;
25
31 [[nodiscard]] virtual Result<RegisterValue>
32 handle(SyscallId id, std::span<const RegisterValue> args, ProcessImage &caller) = 0;
33 };
34
35} // namespace contur
Interface for syscall handling.
virtual Result< RegisterValue > handle(SyscallId id, std::span< const RegisterValue > args, ProcessImage &caller)=0
Handles a syscall request.
virtual ~ISyscallHandler()=default
Full in-memory representation of a process.
A result type that holds either a success value of type T or an ErrorCode.
Definition error.h:104
Error codes and Result<T> type for fallible operations.
Definition block.h:15
SyscallId
Numeric identifiers for system calls.
Definition syscall_ids.h:12
Syscall IDs for the user-kernel boundary.
Common type aliases, sentinel constants, and forward declarations used throughout the Contur 2 kernel...