QP/C++ 6.9.3
qk.cpp File Reference

QK/C++ preemptive kernel core functions. More...

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

Go to the source code of this file.

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 QK_sched_ (void) noexcept
 QK scheduler finds the highest-priority thread ready to run. More...
 
void QK_activate_ (void) noexcept
 QK activator activates the next active object. The activated AO preempts. More...
 

Variables

QK_Attr QK_attr_
 global attributes of the QK kernel More...
 

Detailed Description

QK/C++ preemptive kernel core functions.

Definition in file qk.cpp.

Function Documentation

◆ QK_sched_()

std::uint_fast8_t QK_sched_ ( void  )
noexcept

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

Description
The QK scheduler finds out the priority of the highest-priority AO that (1) has events to process and (2) has priority that is above the current priority.
Returns
the 1-based priority of the the active object, or zero if no eligible active object is ready to run.
Attention
QK_sched_() must be always called with interrupts disabled and returns with interrupts disabled.

Definition at line 329 of file qk.cpp.

◆ QK_activate_()

void QK_activate_ ( void  )
noexcept

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

Description
QK_activate_() activates ready-to run AOs that are above the initial active priority (QK_attr_.actPrio).
Note
The activator might enable interrupts internally, but always returns with interrupts disabled.

Definition at line 356 of file qk.cpp.

Variable Documentation

◆ QK_attr_

QK_Attr QK_attr_

global attributes of the QK kernel

Definition at line 60 of file qk.cpp.