The KasperskyOS kernel has a number of endpoints for managing handles, threads, memory, processes, IPC channels, I/O resources, and others. The libkos
library is used for accessing endpoints.
libkos library
The libkos
library consists of two parts:
coresrv
directory.libkos
library provides abstractions of synchronization primitives, objects, and queues. It also contains wrapper functions for simpler memory allocation and thread management. Header files of the second part of libkos
are in the kos
directory.The libkos
library significantly simplifies the use of core endpoints. The libkos
library functions ensure correct packaging of an IPC message and execution of system calls. Other libraries (including libc
) interact with the kernel through the libkos
library.
To use a KasperskyOS core endpoint, you need to include the libkos
library header file corresponding to this endpoint. For example, to access methods of the IO Manager, you need to include the io_api.h
file:
#include <coresrv/io/io_api.h>
Files used by the libkos library
An intrinsic implementation of the libkos
library can use the following files exported by the kernel:
libkos
library.Example
The I/O Manager is provided for the user in the following files:
coresrv/io/io_api.h
is a header file of the libkos
library.services/io/IO.idl
is the IDL description of the I/O manager.io/io_dma.h
and io/io_irq.h
are header files of the kernel.