From 22fe505a817d26c5b88dae4f602b658498a8a18e Mon Sep 17 00:00:00 2001 From: gdisirio Date: Wed, 21 Jan 2009 11:32:31 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@655 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- src/chschd.c | 8 +++++--- src/chthreads.c | 20 -------------------- src/include/threads.h | 1 - 3 files changed, 5 insertions(+), 24 deletions(-) (limited to 'src') diff --git a/src/chschd.c b/src/chschd.c index e568ac64a..cc89682a8 100644 --- a/src/chschd.c +++ b/src/chschd.c @@ -102,11 +102,13 @@ static void wakeup(void *p) { #ifdef CH_USE_SEMAPHORES case PRWTSEM: chSemFastSignalI(tp->p_wtsemp); - /* Falls into, intentional.*/ + /* Falls into, intentional. */ #endif case PRWTCOND: - chSchReadyI(dequeue(tp))->p_rdymsg = RDY_TIMEOUT; - break; + case PRWTMTX: + /* States requiring dequeuing. */ + dequeue(tp); + /* Falls into, intentional. */ default: chSchReadyI(tp)->p_rdymsg = RDY_TIMEOUT; } diff --git a/src/chthreads.c b/src/chthreads.c index 355687423..28d969e46 100644 --- a/src/chthreads.c +++ b/src/chthreads.c @@ -214,26 +214,6 @@ void chThdSetPriority(tprio_t newprio) { chSysUnlock(); } -/** - * @brief Suspends the invoking thread. - * - * @param tpp pointer to a @p Thread pointer, the @p Thread pointer is set - * to point to the suspended process before it enters the - * @p PRSUSPENDED state. The variable pointed by this parameter - * must be set to @p NULL on entry. - * @note The resume operation is meant to be executed into an interrupt or timer - * handler. The handler is also responsible to clear the variable pointed - * by @p tpp after invoking @p chThdResumeI(). - */ -void chThdSuspend(Thread **tpp) { - - chSysLock(); - chDbgAssert(*tpp == NULL, "chthreads.c, chThdSuspend()"); - *tpp = currp; - chSchGoSleepS(PRSUSPENDED); - chSysUnlock(); -} - /** * @brief Resumes a suspended thread. * diff --git a/src/include/threads.h b/src/include/threads.h index 68f7f9bb9..5ca7dd0ce 100644 --- a/src/include/threads.h +++ b/src/include/threads.h @@ -183,7 +183,6 @@ extern "C" { #endif void chThdSetPriority(tprio_t newprio); Thread *chThdResume(Thread *tp); - void chThdSuspend(Thread **tpp); void chThdTerminate(Thread *tp); void chThdSleep(systime_t time); void chThdSleepUntil(systime_t time); -- cgit v1.2.3