![]() |
Contur 2
Educational OS kernel simulator
|
Inline syscall sequence emitters using the kernel register convention. More...
#include <cstdint>#include <vector>#include "contur/core/types.h"#include "contur/arch/block.h"#include "contur/arch/interrupt.h"#include "contur/arch/program_builder.h"#include "contur/fs/file_descriptor.h"#include "contur/io/io_types.h"#include "contur/syscall/syscall_conventions.h"#include "contur/syscall/syscall_ids.h"Go to the source code of this file.
Namespaces | |
| namespace | contur |
Functions | |
| void | contur::emitOpen (std::vector< Block > &code, RegisterValue resourceId, IoResourceKind kind, OpenMode mode) |
| Emits instructions to open a kernel I/O resource. | |
| void | contur::emitRead (std::vector< Block > &code, std::uint8_t fdReg) |
| Emits instructions to read one value from a kernel I/O descriptor. | |
| void | contur::emitWrite (std::vector< Block > &code, std::uint8_t fdReg, std::uint8_t valReg) |
| Emits instructions to write one value to a kernel I/O descriptor. | |
| void | contur::emitClose (std::vector< Block > &code, std::uint8_t fdReg) |
| Emits instructions to close a kernel I/O descriptor. | |
Inline syscall sequence emitters using the kernel register convention.
Each emitter appends one complete syscall sequence to a program buffer. The calling convention (which registers carry the syscall id and arguments) is defined in syscall_conventions.h. Emitters handle the encoding so that demo programs only express intent, not ABI details.
Definition in file program_syscalls.h.