aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/chmtx.c20
-rw-r--r--src/include/mutexes.h1
2 files changed, 3 insertions, 18 deletions
diff --git a/src/chmtx.c b/src/chmtx.c
index d4da170e1..af2ac0262 100644
--- a/src/chmtx.c
+++ b/src/chmtx.c
@@ -212,23 +212,6 @@ void chMtxUnlockAll(void) {
chSysLock();
- chMtxUnlockAllS();
- chSchRescheduleS();
-
- chSysUnlock();
-}
-
-/**
- * Unlocks all the mutexes owned by the invoking thread, this is <b>MUCH MORE</b>
- * efficient than releasing the mutexes one by one and not just because the
- * call overhead, this function does not have any overhead related to the
- * priority inheritance mechanism.
- * @note This function must be called within a \p chSysLock() / \p chSysUnlock()
- * block.
- * @note This function does not reschedule internally.
- */
-void chMtxUnlockAllS(void) {
-
if (currp->p_mtxlist != NULL) {
do {
Mutex *mp = currp->p_mtxlist;
@@ -238,7 +221,10 @@ void chMtxUnlockAllS(void) {
chSchReadyI(fifo_remove(&mp->m_queue), RDY_OK);
} while (currp->p_mtxlist != NULL);
currp->p_prio = currp->p_realprio;
+ chSchRescheduleS();
}
+
+ chSysUnlock();
}
#endif /* CH_USE_MUTEXES */
diff --git a/src/include/mutexes.h b/src/include/mutexes.h
index e2881423d..9e9422bd5 100644
--- a/src/include/mutexes.h
+++ b/src/include/mutexes.h
@@ -49,7 +49,6 @@ extern "C" {
void chMtxUnlock(void);
void chMtxUnlockS(void);
void chMtxUnlockAll(void);
- void chMtxUnlockAllS(void);
#ifdef __cplusplus
}
#endif