System services
As NightOS' kernel is not monolithic but a microkernel, it only handles the most fundamental tasks of the system, like memory and processes management, as well as direct hardware communication.
The vast majority of its features can be found in system services, run by the system itself under the sys
DID.
This splitting implies that most low-level features of the system are documented in the individual services' specifications documents, which you will find here.
Nomenclature
System services are referred to as the sys::
services.
All methods and notifications describe the required permissions to use them, their arguments.
They also use common error codes:
0x00
: cannot read syscall's code or arguments (error while reading memory)0x01
: the requested syscall does not exist0x02
: at least one argument is invalid (e.g. providing a pointer to the0
address)0x03
: unmapped memory pointer (e.g. provided a pointer to a memory location that is not mapped yet)0x04
: memory permission error (e.g. provided a writable buffer to an allocated but non-writable memory address)0x05
: insufficient permissions0x06
: driver error0x10
to0x1F
: invalid arguments provided (e.g. value is too high)0x20
to0x2F
: arguments are not valid in the current context (e.g. provided ID does not exist)0x30
to0x3F
: resource errors (e.g. file not found)0x40
to0x4F
: driver errors0x50
to0x5F
: hardware errors0x60
to0xFF
: other types of errors
All methods return an answer, though it may be empty (indicated by a None). System services' answers always conclude the exchange.
List of system services
- PID 10:
sys::fs
: filesystem management - PID 11:
sys::fsh
: high-level filesystem management - PID 12:
sys::hw
: hardware communication - PID 13:
sys::perm
: permissions management - PID 14:
sys::net
: network communications - PID 15:
sys::crypto
: cryptography utilities - PID 16:
sys::crashsave
: crash saves management - PID 17:
sys::hydre
: Hydre shell service - PID 18:
sys::ui
: user interface service - PID 19:
sys::app
: applications management service - PID 20:
sys::process
: processes management service