qk_port.h File Reference

QK/C++ port to QK for a "generic" C++ compiler. More...

#include "qk.h"

Go to the source code of this file.

Defines

#define QK_EXT_SAVE(act_)   FPU_save((FPU_context *)(act_)->m_thread)
 Define the method for saving the extended context (e.g., the context of a floating-point co-processor).
#define QK_EXT_RESTORE(act_)   FPU_restore((FPU_context *)(act_)->m_thread)
 Define the method for restoring the extended context (e.g., the context of a floating-point co-processor).
#define QK_TLS(act_)   _impure_ptr = (struct _reent *)(act_)->m_thread
 Define the method for switching the Thread-Local-Storage for for a given thread.
#define QK_ISR_ENTRY()
 Define the ISR entry sequence, if the compiler supports writing interrupts in C++.
#define QK_ISR_EXIT()
 Define the ISR exit sequence, if the compiler supports writing interrupts in C++.


Detailed Description

QK/C++ port to QK for a "generic" C++ compiler.

Note:
This is just an EXAMPLE of a QK port used for "linting" the QK. Ports of QK are located in the directory <qpcpp_3>/ports.

Definition in file qk_port.h.


Define Documentation

#define QK_EXT_RESTORE ( act_   )     FPU_restore((FPU_context *)(act_)->m_thread)

Define the method for restoring the extended context (e.g., the context of a floating-point co-processor).

Note:
This is just an example of QK_EXT_RESTORE macro. You need to define the macro appropriately for the co-processor you're using. This macro is only used in the extended QK scheduler QK_scheduleExt_(). If you define QK_EXT_RESTORE, you also need to provide QK_EXT_SAVE and QK_EXT_TYPE.

Definition at line 57 of file qk_port.h.

#define QK_EXT_SAVE ( act_   )     FPU_save((FPU_context *)(act_)->m_thread)

Define the method for saving the extended context (e.g., the context of a floating-point co-processor).

Note:
This is just an example of QK_EXT_SAVE macro. You need to define the macro appropriately for the co-processor you're using. This macro is only used in the extended QK scheduler QK_scheduleExt_(). If you define QK_EXT_SAVE, you also need to provide QK_EXT_RESTORE and QK_EXT_TYPE.

Definition at line 48 of file qk_port.h.

 
#define QK_ISR_ENTRY (  ) 

Value:

do { \
    ++QK_intNest_; \
    QF_QS_ISR_ENTRY(QK_intNest_, QK_currPrio_); \
} while (0)
Define the ISR entry sequence, if the compiler supports writing interrupts in C++.

Note:
This is just an example of QK_ISR_ENTRY. You need to define the macro appropriately for the CPU/compiler you're using. Also, some QK ports will not define this macro, but instead will provide ISR skeleton code in assembly.

Definition at line 96 of file qk_port.h.

 
#define QK_ISR_EXIT (  ) 

Value:

do { \
    send End-Of-Interrupt instruction to the Interrupt Controller; \
    QF_QS_ISR_EXIT(QK_intNest_, QK_currPrio_); \
    --QK_intNest_; \
    if (QK_intNest_ == (uint8_t)0) { \
        QK_scheduleExt_(); \
    } \
} while (0)
Define the ISR exit sequence, if the compiler supports writing interrupts in C++.

Note:
This is just an example of QK_ISR_EXIT. You need to define the macro appropriately for the CPU/compiler you're using. Also, some QK ports will not define this macro, but instead will provide ISR skeleton code in assembly.

Definition at line 109 of file qk_port.h.

#define QK_TLS ( act_   )     _impure_ptr = (struct _reent *)(act_)->m_thread

Define the method for switching the Thread-Local-Storage for for a given thread.

Note:
This is just an example of QK_TLS macro. You need to define the macro appropriately for the runtime library you're using. This macro is optional and you don't need to define it. The macro is used in both the regular QK scheduler QK_schedule_() and the extended QK scheduler QK_scheduleExt_().

Definition at line 77 of file qk_port.h.


Generated on Sat Dec 27 21:35:26 2008 for QP/C++ by  doxygen 1.5.4