Sen API
Sen Libraries
Loading...
Searching...
No Matches
sen::kernel::Kernel Class Referencefinal

Main entry point of a sen microkernel. More...

#include <kernel.h>

Public Member Functions

 Kernel (KernelConfig config)
 ~Kernel () noexcept
int run (KernelBlockMode blockMode=KernelBlockMode::doBlock)
 Fire up the execution of the kernel. In case the is already running, -1 is returned. This method is thread-safe.
void requestStop (int exitCode=0)
 Stops the execution and deallocates runtime resources. This method is thread-safe.
const KernelConfiggetConfig () const noexcept
 Gets the configuration used to construct the kernel. This method is thread-safe.
std::filesystem::path getConfigPath () const noexcept
 Gets the path to the configuration file used to construct the kernel. This method is thread-safe.

Static Public Member Functions

static const BuildInfo & getBuildInfo () noexcept
 Gets the kernel build information.
static void registerTerminationHandler ()
 Registers the kernel termination handler.

Friends

class KernelApi
class PreloadApi
class UnloadApi
class impl::Runner
class TestKernel

Detailed Description

Main entry point of a sen microkernel.

Constructor & Destructor Documentation

◆ Kernel()

sen::kernel::Kernel::Kernel ( KernelConfig config)
explicit

◆ ~Kernel()

sen::kernel::Kernel::~Kernel ( )
noexcept

Member Function Documentation

◆ run()

int sen::kernel::Kernel::run ( KernelBlockMode blockMode = KernelBlockMode::doBlock)
nodiscard

Fire up the execution of the kernel. In case the is already running, -1 is returned. This method is thread-safe.

◆ requestStop()

void sen::kernel::Kernel::requestStop ( int exitCode = 0)

Stops the execution and deallocates runtime resources. This method is thread-safe.

◆ getConfig()

const KernelConfig & sen::kernel::Kernel::getConfig ( ) const
nodiscardnoexcept

Gets the configuration used to construct the kernel. This method is thread-safe.

◆ getConfigPath()

std::filesystem::path sen::kernel::Kernel::getConfigPath ( ) const
nodiscardnoexcept

Gets the path to the configuration file used to construct the kernel. This method is thread-safe.

◆ getBuildInfo()

const BuildInfo & sen::kernel::Kernel::getBuildInfo ( )
staticnodiscardnoexcept

Gets the kernel build information.

◆ registerTerminationHandler()

void sen::kernel::Kernel::registerTerminationHandler ( )
static

Registers the kernel termination handler.

◆ KernelApi

friend class KernelApi
friend

◆ PreloadApi

friend class PreloadApi
friend

◆ UnloadApi

friend class UnloadApi
friend

◆ impl::Runner

friend class impl::Runner
friend

◆ TestKernel

friend class TestKernel
friend

The documentation for this class was generated from the following file: