mirror of
https://github.com/QuantumLeaps/qpcpp.git
synced 2025-01-14 05:42:57 +08:00
5.6.4c
This commit is contained in:
parent
75ef6eea18
commit
7401475178
@ -9,7 +9,7 @@
|
||||
License Type: Windows Single User License
|
||||
Licensed To : Quantum Leaps, LLC
|
||||
License No. : WS2975 License Date: Dec 15, 2013
|
||||
Build Date : Sep 2 2009 Run Date: May 04, 2016
|
||||
Build Date : Sep 2 2009 Run Date: May 09, 2016
|
||||
(C)1996-2009 M Squared Technologies LLC
|
||||
________________________________________________________________________
|
||||
|
||||
@ -282,7 +282,7 @@
|
||||
|
||||
~~ Total File Summary ~~
|
||||
|
||||
LOC 252 eLOC 237 lLOC 105 Comment 478 Lines 835
|
||||
LOC 260 eLOC 245 lLOC 105 Comment 482 Lines 843
|
||||
------------------------------------------------------------------------
|
||||
|
||||
~~ File Functional Summary ~~
|
||||
@ -1666,12 +1666,12 @@
|
||||
File: ..\source\qk_mutex.cpp
|
||||
________________________________________________________________________
|
||||
|
||||
Function: QP::QKMutex::init
|
||||
Function: QP::QMutex::init
|
||||
Parameters: (uint_fast8_t const prio)
|
||||
Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
|
||||
LOC 4 eLOC 3 lLOC 2 Comment 15 Lines 4
|
||||
|
||||
Function: QP::QKMutex::lock
|
||||
Function: QP::QMutex::lock
|
||||
Parameters: (void)
|
||||
Cyclomatic Complexity Vg Detail
|
||||
Function Base : 1
|
||||
@ -1680,7 +1680,7 @@
|
||||
Complexity Param 0 Return 1 Cyclo Vg 3 Total 4
|
||||
LOC 17 eLOC 15 lLOC 7 Comment 24 Lines 23
|
||||
|
||||
Function: QP::QKMutex::unlock
|
||||
Function: QP::QMutex::unlock
|
||||
Parameters: (void)
|
||||
Cyclomatic Complexity Vg Detail
|
||||
Function Base : 1
|
||||
@ -2513,7 +2513,7 @@
|
||||
|
||||
~~ Total Project Summary ~~
|
||||
|
||||
LOC 5576 eLOC 4898 lLOC 2256 Comment 6448 Lines 12367
|
||||
LOC 5584 eLOC 4906 lLOC 2256 Comment 6452 Lines 12375
|
||||
Average per File, metric/41 files
|
||||
LOC 136 eLOC 119 lLOC 55 Comment 157 Lines 301
|
||||
|
||||
@ -3154,17 +3154,17 @@
|
||||
Complexity Param 1 Return 1 Cyclo Vg 6 Total 8
|
||||
LOC 54 eLOC 47 lLOC 24 Comment 46 Lines 77
|
||||
|
||||
Function: QP::QKMutex::init
|
||||
Function: QP::QMutex::init
|
||||
Parameters: (uint_fast8_t const prio)
|
||||
Complexity Param 1 Return 1 Cyclo Vg 1 Total 3
|
||||
LOC 4 eLOC 3 lLOC 2 Comment 15 Lines 4
|
||||
|
||||
Function: QP::QKMutex::lock
|
||||
Function: QP::QMutex::lock
|
||||
Parameters: (void)
|
||||
Complexity Param 0 Return 1 Cyclo Vg 3 Total 4
|
||||
LOC 17 eLOC 15 lLOC 7 Comment 24 Lines 23
|
||||
|
||||
Function: QP::QKMutex::unlock
|
||||
Function: QP::QMutex::unlock
|
||||
Parameters: (void)
|
||||
Complexity Param 0 Return 1 Cyclo Vg 4 Total 5
|
||||
LOC 22 eLOC 19 lLOC 10 Comment 26 Lines 28
|
||||
|
@ -1,4 +1,4 @@
|
||||
QKMutex l_rndMutex; // mutex to protect the random number generator
|
||||
QMutex l_rndMutex; // mutex to protect the random number generator
|
||||
|
||||
|
||||
void BSP::randomSeed(uint32_t seed) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
///***************************************************************************
|
||||
// Product: DPP example, EK-TM4C123GXL board, preemptive QK kernel
|
||||
// Last updated for version 5.6.4
|
||||
// Last updated on 2016-05-04
|
||||
// Last updated on 2016-05-09
|
||||
//
|
||||
// Q u a n t u m L e a P s
|
||||
// ---------------------------
|
||||
@ -76,7 +76,7 @@ Q_ASSERT_COMPILE(MAX_KERNEL_AWARE_CMSIS_PRI <= (0xFF >>(8-__NVIC_PRIO_BITS)));
|
||||
#define BTN_SW2 (1U << 0)
|
||||
|
||||
static uint32_t l_rnd; // random seed
|
||||
static QP::QKMutex l_rndMutex; // to protect the random number generator
|
||||
static QP::QMutex l_rndMutex; // to protect the random number generator
|
||||
|
||||
#ifdef Q_SPY
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
///***************************************************************************
|
||||
// Product: DPP example, STM32 NUCLEO-L053R8 board, preemptive QK kernel
|
||||
// Last updated for version 5.6.4
|
||||
// Last updated on 2016-05-04
|
||||
// Last updated on 2016-05-09
|
||||
//
|
||||
// Q u a n t u m L e a P s
|
||||
// ---------------------------
|
||||
@ -71,7 +71,7 @@ Q_ASSERT_COMPILE(MAX_KERNEL_AWARE_CMSIS_PRI <= (0xFF >>(8-__NVIC_PRIO_BITS)));
|
||||
#define BTN_B1 (1U << 13)
|
||||
|
||||
static unsigned l_rnd; // random seed
|
||||
static QP::QKMutex l_rndMutex; // to protect the random number generator
|
||||
static QP::QMutex l_rndMutex; // to protect the random number generator
|
||||
|
||||
#ifdef Q_SPY
|
||||
|
||||
|
12
include/qf.h
12
include/qf.h
@ -4,7 +4,7 @@
|
||||
/// @cond
|
||||
///***************************************************************************
|
||||
/// Last updated for version 5.6.4
|
||||
/// Last updated on 2016-05-04
|
||||
/// Last updated on 2016-05-09
|
||||
///
|
||||
/// Q u a n t u m L e a P s
|
||||
/// ---------------------------
|
||||
@ -260,11 +260,15 @@ public:
|
||||
|
||||
friend class QF;
|
||||
friend class QTimeEvt;
|
||||
friend class QKMutex;
|
||||
#ifdef qk_h
|
||||
friend class QMutex;
|
||||
#endif // qk_h
|
||||
#ifdef qxk_h
|
||||
friend class QXK;
|
||||
friend class QXThread;
|
||||
friend class QXMutex;
|
||||
friend class QXSemaphore;
|
||||
#endif // qxk_h
|
||||
};
|
||||
|
||||
//****************************************************************************
|
||||
@ -438,7 +442,9 @@ private:
|
||||
QTimeEvt *toTimeEvt(void) { return static_cast<QTimeEvt *>(m_act); }
|
||||
|
||||
friend class QF;
|
||||
#ifdef qxk_h
|
||||
friend class QXThread;
|
||||
#endif // qxk_h
|
||||
};
|
||||
|
||||
|
||||
@ -577,7 +583,9 @@ private:
|
||||
|
||||
friend class QMActive;
|
||||
friend class QTimeEvt;
|
||||
#ifdef qxk_h
|
||||
friend class QXThread;
|
||||
#endif // qxk_h
|
||||
};
|
||||
|
||||
} // namespace QP
|
||||
|
@ -4,7 +4,7 @@
|
||||
/// @cond
|
||||
///***************************************************************************
|
||||
/// Last updated for version 5.6.4
|
||||
/// Last updated on 2016-05-04
|
||||
/// Last updated on 2016-05-09
|
||||
///
|
||||
/// Q u a n t u m L e a P s
|
||||
/// ---------------------------
|
||||
@ -103,7 +103,7 @@ public:
|
||||
};
|
||||
|
||||
/*! Priority-ceiling Mutex the QK preemptive kernel */
|
||||
class QKMutex {
|
||||
class QMutex {
|
||||
public:
|
||||
void init(uint_fast8_t const prio);
|
||||
void lock(void);
|
||||
@ -161,7 +161,7 @@ extern uint_fast8_t volatile QK_lockPrio_; //!< lock prio (0 == no-lock)
|
||||
// QF-specific scheduler locking
|
||||
//! Internal port-specific macro to represent the scheduler lock status
|
||||
// that needs to be preserved to allow nesting of locks.
|
||||
#define QF_SCHED_STAT_TYPE_ QKMutex
|
||||
#define QF_SCHED_STAT_TYPE_ QMutex
|
||||
|
||||
//! Internal port-specific macro for selective scheduler locking.
|
||||
#define QF_SCHED_LOCK_(pLockStat_, prio_) do { \
|
||||
|
@ -1,12 +1,12 @@
|
||||
/// @file
|
||||
/// @brief QP::QKMutex::init(), QP::QKMutex::lock(), and QP::QKMutex::unlock()
|
||||
/// @brief QP::QMutex::init(), QP::QMutex::lock(), and QP::QMutex::unlock()
|
||||
/// definitions.
|
||||
/// @ingroup qk
|
||||
/// @cond
|
||||
///***************************************************************************
|
||||
/// Product: QK/C++
|
||||
/// Last updated for version 5.6.4
|
||||
/// Last updated on 2016-05-04
|
||||
/// Last updated on 2016-05-09
|
||||
///
|
||||
/// Q u a n t u m L e a P s
|
||||
/// ---------------------------
|
||||
@ -70,13 +70,13 @@ enum {
|
||||
/// @note
|
||||
/// A mutex must be initialized before it can be locked or unlocked.
|
||||
///
|
||||
/// @sa QP::QKMutex::lock(), QP::QKMutex::unlock()
|
||||
/// @sa QP::QMutex::lock(), QP::QMutex::unlock()
|
||||
///
|
||||
/// @usage
|
||||
/// The following example shows how to initialize, lock and unlock QK mutex:
|
||||
/// @include qk_mux.cpp
|
||||
///
|
||||
void QKMutex::init(uint_fast8_t const prio) {
|
||||
void QMutex::init(uint_fast8_t const prio) {
|
||||
m_lockPrio = prio;
|
||||
m_prevPrio = static_cast<uint_fast8_t>(MUTEX_UNUSED);
|
||||
}
|
||||
@ -89,16 +89,16 @@ void QKMutex::init(uint_fast8_t const prio) {
|
||||
/// A mutex must be initialized before it can be locked or unlocked.
|
||||
///
|
||||
/// @note
|
||||
/// QP::QKMutex::lock() must be always followed by the corresponding
|
||||
/// QP::QKMutex::unlock().
|
||||
/// QP::QMutex::lock() must be always followed by the corresponding
|
||||
/// QP::QMutex::unlock().
|
||||
///
|
||||
/// @sa QP::QKMutex::init(), QP::QKMutex::unlock()
|
||||
/// @sa QP::QMutex::init(), QP::QMutex::unlock()
|
||||
///
|
||||
/// @usage
|
||||
/// The following example shows how to initialize, lock and unlock QK mutex:
|
||||
/// @include qk_mux.cpp
|
||||
///
|
||||
void QKMutex::lock(void) {
|
||||
void QMutex::lock(void) {
|
||||
QF_CRIT_STAT_
|
||||
QF_CRIT_ENTRY_();
|
||||
|
||||
@ -130,16 +130,16 @@ void QKMutex::lock(void) {
|
||||
/// A mutex must be initialized before it can be locked or unlocked.
|
||||
///
|
||||
/// @note
|
||||
/// QP::QKMutex::unlock() must always follow the corresponding
|
||||
/// QP::QKMutex::lock().
|
||||
/// QP::QMutex::unlock() must always follow the corresponding
|
||||
/// QP::QMutex::lock().
|
||||
///
|
||||
/// @sa QP::QKMutex::init(), QP::QKMutex::lock()
|
||||
/// @sa QP::QMutex::init(), QP::QMutex::lock()
|
||||
///
|
||||
/// @usage
|
||||
/// The following example shows how to initialize, lock and unlock QK mutex:
|
||||
/// @include qk_mux.cpp
|
||||
///
|
||||
void QKMutex::unlock(void) {
|
||||
void QMutex::unlock(void) {
|
||||
QF_CRIT_STAT_
|
||||
QF_CRIT_ENTRY_();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user