QP/C++ 6.9.3
qxk.cpp File Reference

QXK/C++ preemptive kernel core functions public interface. More...

#include "qf_port.hpp"
#include "qxk_pkg.hpp"
#include "qassert.h"
#include "qs_port.hpp"
#include "qs_pkg.hpp"
Include dependency graph for qxk.cpp:

Go to the source code of this file.

Data Structures

class  QXKIdleThread
 

Namespaces

 QP
 namespace associated with the QP/C++ framework
 

Functions

static void initial_events (void)
 process all events posted during initialization More...
 
std::uint_fast8_t QXK_sched_ (void) noexcept
 QXK scheduler finds the highest-priority thread ready to run. More...
 
void QXK_activate_ (void)
 QXK activator activates the next active object. The activated AO preempts. More...
 
QP::QActiveQXK_current (void) noexcept
 return the currently executing active-object/thread More...
 

Variables

QXK_Attr QXK_attr_
 global attributes of the QXK kernel More...
 
static QXKIdleThread l_idleThread
 

Detailed Description

QXK/C++ preemptive kernel core functions public interface.

Definition in file qxk.cpp.

Function Documentation

◆ QXK_sched_()

std::uint_fast8_t QXK_sched_ ( void  )
noexcept

QXK scheduler finds the highest-priority thread ready to run.

Description
The QXK scheduler finds the priority of the highest-priority thread that is ready to run.
Returns
the 1-based priority of the the active object to run next, or zero if no eligible active object is found.
Attention
QXK_sched_() must be always called with interrupts disabled and returns with interrupts disabled.

Definition at line 346 of file qxk.cpp.

◆ QXK_activate_()

void QXK_activate_ ( void  )

QXK activator activates the next active object. The activated AO preempts.

Attention
QXK_activate_() must be always called with interrupts disabled and returns with interrupts disabled.
Note
The activate function might enable interrupts internally, but it always returns with interrupts disabled.
Precondition
QXK_attr_.next must be valid

Definition at line 423 of file qxk.cpp.

◆ QXK_current()

QP::QActive* QXK_current ( void  )
noexcept

return the currently executing active-object/thread

Precondition
the QXK kernel must be running
Postcondition
the current thread must be valid

Definition at line 555 of file qxk.cpp.

Variable Documentation

◆ QXK_attr_

QXK_Attr QXK_attr_

global attributes of the QXK kernel

Definition at line 60 of file qxk.cpp.