mirror of https://github.com/rusefi/ChibiOS.git
Small API change for consistency.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11970 110e8d01-0319-4d1e-a829-52ad28d1bb01
This commit is contained in:
parent
fc1588e684
commit
fea81eee77
|
@ -139,9 +139,9 @@ static inline bool chMtxQueueNotEmptyS(mutex_t *mp) {
|
|||
* @return A pointer to the next mutex in the stack.
|
||||
* @retval NULL if the stack is empty.
|
||||
*
|
||||
* @sclass
|
||||
* @xclass
|
||||
*/
|
||||
static inline mutex_t *chMtxGetNextMutexS(void) {
|
||||
static inline mutex_t *chMtxGetNextMutexX(void) {
|
||||
|
||||
return chThdGetSelfX()->mtxlist;
|
||||
}
|
||||
|
|
|
@ -204,15 +204,14 @@ msg_t chCondWait(condition_variable_t *cp) {
|
|||
*/
|
||||
msg_t chCondWaitS(condition_variable_t *cp) {
|
||||
thread_t *ctp = currp;
|
||||
mutex_t *mp;
|
||||
mutex_t *mp = chMtxGetNextMutexX();
|
||||
msg_t msg;
|
||||
|
||||
chDbgCheckClassS();
|
||||
chDbgCheck(cp != NULL);
|
||||
chDbgAssert(ctp->mtxlist != NULL, "not owning a mutex");
|
||||
chDbgAssert(mp != NULL, "not owning a mutex");
|
||||
|
||||
/* Getting "current" mutex and releasing it.*/
|
||||
mp = chMtxGetNextMutexS();
|
||||
/* Releasing "current" mutex.*/
|
||||
chMtxUnlockS(mp);
|
||||
|
||||
/* Start waiting on the condition variable, on exit the mutex is taken
|
||||
|
@ -294,15 +293,14 @@ msg_t chCondWaitTimeout(condition_variable_t *cp, sysinterval_t timeout) {
|
|||
* @sclass
|
||||
*/
|
||||
msg_t chCondWaitTimeoutS(condition_variable_t *cp, sysinterval_t timeout) {
|
||||
mutex_t *mp;
|
||||
mutex_t *mp = chMtxGetNextMutexX();
|
||||
msg_t msg;
|
||||
|
||||
chDbgCheckClassS();
|
||||
chDbgCheck((cp != NULL) && (timeout != TIME_IMMEDIATE));
|
||||
chDbgAssert(currp->mtxlist != NULL, "not owning a mutex");
|
||||
chDbgAssert(mp != NULL, "not owning a mutex");
|
||||
|
||||
/* Getting "current" mutex and releasing it.*/
|
||||
mp = chMtxGetNextMutexS();
|
||||
/* Releasing "current" mutex.*/
|
||||
chMtxUnlockS(mp);
|
||||
|
||||
/* Start waiting on the condition variable, on exit the mutex is taken
|
||||
|
|
|
@ -94,6 +94,7 @@
|
|||
*****************************************************************************
|
||||
|
||||
*** Next ***
|
||||
- NEW: Change, chMtxGetNextMutexS() renamed to chMtxGetNextMutexX().
|
||||
- NEW: RT C++ wrapper reworked, now it is mostly inline code, added some new
|
||||
wrappers and methods. Added wrappers for more API functions. BaseThreads
|
||||
are no more descendants of ThreadReference.
|
||||
|
|
Loading…
Reference in New Issue