[CPP wrapper] Added unlock functions to Mutex class.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7199 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
2ccbae7dc4
commit
c0df75d793
|
@ -529,6 +529,16 @@ namespace chibios_rt {
|
||||||
chMtxLockS(&mutex);
|
chMtxLockS(&mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Mutex::unlock(void) {
|
||||||
|
|
||||||
|
chMtxUnlock(&mutex);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Mutex::unlockS(void) {
|
||||||
|
|
||||||
|
chMtxLockS(&mutex);
|
||||||
|
}
|
||||||
|
|
||||||
#if CH_CFG_USE_CONDVARS
|
#if CH_CFG_USE_CONDVARS
|
||||||
/*------------------------------------------------------------------------*
|
/*------------------------------------------------------------------------*
|
||||||
* chibios_rt::CondVar *
|
* chibios_rt::CondVar *
|
||||||
|
|
|
@ -1215,6 +1215,28 @@ namespace chibios_rt {
|
||||||
* @sclass
|
* @sclass
|
||||||
*/
|
*/
|
||||||
void lockS(void);
|
void lockS(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Unlocks the next owned mutex in reverse lock order.
|
||||||
|
* @pre The invoking thread <b>must</b> have at least one owned mutex.
|
||||||
|
* @post The mutex is unlocked and removed from the per-thread stack of
|
||||||
|
* owned mutexes.
|
||||||
|
*
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
void unlock(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Unlocks the next owned mutex in reverse lock order.
|
||||||
|
* @pre The invoking thread <b>must</b> have at least one owned mutex.
|
||||||
|
* @post The mutex is unlocked and removed from the per-thread stack of
|
||||||
|
* owned mutexes.
|
||||||
|
* @post This function does not reschedule so a call to a rescheduling
|
||||||
|
* function must be performed before unlocking the kernel.
|
||||||
|
*
|
||||||
|
* @sclass
|
||||||
|
*/
|
||||||
|
void unlockS(void);
|
||||||
};
|
};
|
||||||
|
|
||||||
#if CH_CFG_USE_CONDVARS || defined(__DOXYGEN__)
|
#if CH_CFG_USE_CONDVARS || defined(__DOXYGEN__)
|
||||||
|
|
Loading…
Reference in New Issue