Baigudin Software avatar
Baigudin Software logo
home
ru region
en region

Interface «api::Kernel»

A kernel interface of the operating system.

public: virtual ~Kernel();

Destructor.

public: virtual api::Interrupt* createInterrupt(api::Task& handler, int32 source);

Creates new interrupt resource.

Parameters:
handler — user class which implements an interrupt handler interface.
source — available interrupt source number.

Returns:
new interrupt resource, or NULL if error has been occurred.

public: virtual api::Mutex* createMutex();

Creates new mutex resource.

Returns:
new mutex resource, or NULL if error has been occurred.

public: virtual api::Semaphore* createSemaphore(int32 permits);

Creates new unfair semaphore resource.

Parameters:
permits — the initial number of permits available.

Returns:
new semaphore resource, or NULL if error has been occurred.

public: virtual api::Semaphore* createSemaphore(int32 permits, bool isFair);

Creates new semaphore resource.

Parameters:
permits — the initial number of permits available.
isFair — true if this semaphore will guarantee FIFO granting of permits under contention.

Returns:
new semaphore resource, or NULL if error has been occurred.

public: virtual api::Value<int64>& getExecutionTime();

Returns a value of a kernel running time in nanoseconds.

Returns:
a running time in nanoseconds.

public: virtual api::Toggle& getGlobalInterrupt();

Returns a global interrupt resource.

Returns:
a global interrupt resource.

public: virtual api::Runtime& getRuntime();

Returns a kernel runtime environment.

Returns:
a kernel runtime environment.

public: virtual api::Scheduler& getScheduler();

Returns a kernel scheduler.

Returns:
a kernel scheduler.

public: virtual int32 getStackSize();

Returns a default size of stack in bytes.

Returns:
a size of stack in bytes.

public: virtual bool isConstructed() const;

Tests if this object has been constructed.

public: static bool isObject(const Type* obj);

Tests if given object has been constructed object.

Back to class list