QP-nano
Functions | Variables
qkn.c File Reference
#include "qpn_port.h"

Go to the source code of this file.

Functions

void QF_run (void)
 Transfers control to QF to run the application.
uint8_t QK_schedPrio_ (void)
 Find the highest-priority task ready to run.
void QK_sched_ (uint8_t p) Q_REENTRANT
 QK-nano scheduler.

Variables

uint8_t volatile QK_currPrio_ = (uint8_t)( 8 + 1)

Detailed Description

QK-nano implementation.

Definition in file qkn.c.


Function Documentation

void QF_run ( void  )

Transfers control to QF to run the application.

QF_run() implemetns the simple non-preemptive scheduler. QF_run() must be called from your startup code after you initialize the QF and define at least one active object control block in QF_active[].

Note:
When the Quantum Kernel (QK) is used as the underlying real-time kernel for the QF, all platfrom dependencies are handled in the QK, so no porting of QF is necessary. In other words, you only need to recompile the QF platform-independent code with the compiler for your platform, but you don't need to provide any platform-specific implementation (so, no qf_port.c file is necessary). Moreover, QK implements the function QF_run() in a platform-independent way, in the modile qk.c.

Definition at line 83 of file qkn.c.

References QF_onStartup(), and QK_onIdle().

void QK_sched_ ( uint8_t  p)

QK-nano scheduler.

Note:
QK_sched_() must be always called with interrupts locked. The scheduler might unlock the interrupts internally, but always returns with interrupts locked.

Definition at line 125 of file qkn.c.

References QActive::nUsed, Q_ASSERT, Q_PAR, Q_PARAM_SIZE, Q_ROM, Q_ROM_BYTE, Q_ROM_PTR, Q_ROM_VAR, Q_SIG, QF_active, QF_INT_LOCK, QF_INT_UNLOCK, QF_readySet_, QFsm_dispatch(), QHsm_dispatch(), QK_currPrio_, and QActive::tail.

Referenced by QActive_post().

uint8_t QK_schedPrio_ ( void  )

Find the highest-priority task ready to run.

Note:
QK_schedPrio_() must be always called with interrupts locked and returns with interrupts locked.

Definition at line 98 of file qkn.c.

References Q_ROM_BYTE, and QF_readySet_.

Referenced by QActive_post().


Variable Documentation

uint8_t volatile QK_currPrio_ = (uint8_t)( 8 + 1)

current QK priority

Definition at line 44 of file qkn.c.

Referenced by QF_init(), and QK_sched_().