aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/chschd.c8
-rw-r--r--src/chthreads.c20
-rw-r--r--src/include/threads.h1
3 files changed, 5 insertions, 24 deletions
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
@@ -215,26 +215,6 @@ void chThdSetPriority(tprio_t newprio) {
}
/**
- * @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.
*
* @param tp the pointer to the 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);