QP/C  5.9.7
qxk_pkg.h File Reference

Internal (package scope) QXK/C interface. More...

#include "qf_pkg.h"

Go to the source code of this file.

Enumerations

enum  QXK_Timeouts { QXK_DELAY_SIG = Q_USER_SIG, QXK_QUEUE_SIG, QXK_SEMA_SIG }
 timeout signals
 

Functions

void QXK_start_ (void)
 internal QXK function to start multitasking (typically in assembly)
 
void QXK_stackInit_ (void *thr, QXThreadHandler handler, void *stkSto, uint_fast16_t stkSize)
 initialize the private stack of a given QXThread
 
void QXK_threadRet_ (void)
 called when a thread function returns More...
 
void QXThread_block_ (QXThread const *const me)
 internal functin to block (suspend) a given extended thread More...
 
void QXThread_unblock_ (QXThread const *const me)
 internal function to unblock (resume) a given extended thread. More...
 
void QXThread_teArm_ (QXThread *const me, QSignal sig, uint_fast16_t const nTicks)
 internal function to arm the private time event for a given thread. More...
 
bool QXThread_teDisarm_ (QXThread *const me)
 internal function to disarm the private time event for a given thread. More...
 

Detailed Description

Internal (package scope) QXK/C interface.

Definition in file qxk_pkg.h.

Function Documentation

◆ QXK_threadRet_()

void QXK_threadRet_ ( void  )

called when a thread function returns

Description
Called when the extended-thread handler function returns.
Note
Most thread handler functions are structured as endless loops that never return. But it is also possible to structure threads as one-shot functions that perform their job and return. In that case this function peforms cleanup after the thread.

Definition at line 639 of file qxk_xthr.c.

◆ QXThread_block_()

void QXThread_block_ ( QXThread const *const  me)

internal functin to block (suspend) a given extended thread

Description
Intenral implementation of blocking the given extended thread.
Note
must be called from within a critical section
Precondition
the thread holding the lock cannot block!

Definition at line 479 of file qxk_xthr.c.

◆ QXThread_unblock_()

void QXThread_unblock_ ( QXThread const *const  me)

internal function to unblock (resume) a given extended thread.

Description
Intenral implementation of un-blocking the given extended thread.
Note
must be called from within a critical section

Definition at line 495 of file qxk_xthr.c.

◆ QXThread_teArm_()

void QXThread_teArm_ ( QXThread *const  me,
QSignal  sig,
uint_fast16_t const  nTicks 
)

internal function to arm the private time event for a given thread.

Description
Intenral implementation of arming the private time event for a given timeout at a given system tick rate.
Note
must be called from within a critical section
Precondition
the time event must be unused

Definition at line 513 of file qxk_xthr.c.

◆ QXThread_teDisarm_()

bool QXThread_teDisarm_ ( QXThread *const  me)

internal function to disarm the private time event for a given thread.

Description
Intenral implementation of disarming the private time event.
Note
must be called from within a critical section

Definition at line 555 of file qxk_xthr.c.