From 398c024927d7fb31d86c50e081a74a9c8fd45769 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 23 Dec 2007 09:40:50 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@159 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- src/chmtx.c | 20 +++----------------- src/include/mutexes.h | 1 - 2 files changed, 3 insertions(+), 18 deletions(-) (limited to 'src') 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 MUCH MORE - * 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 -- cgit v1.2.3