aboutsummaryrefslogtreecommitdiffstats
path: root/os/rt/src
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-09-17 10:37:54 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-09-17 10:37:54 +0000
commit227f9b7e3e3ad570adccec22df0e2da29080b4e9 (patch)
tree1215e6f68b94faa2366687d7b15d8e15700fa95a /os/rt/src
parent7fa620e9fb996b0763554dec4ec91aa299e36e38 (diff)
downloadChibiOS-227f9b7e3e3ad570adccec22df0e2da29080b4e9.tar.gz
ChibiOS-227f9b7e3e3ad570adccec22df0e2da29080b4e9.tar.bz2
ChibiOS-227f9b7e3e3ad570adccec22df0e2da29080b4e9.zip
Added new chThdDoDequeueNextI() API.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7286 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/rt/src')
-rw-r--r--os/rt/src/chthreads.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/os/rt/src/chthreads.c b/os/rt/src/chthreads.c
index d7e9bc13d..3cff4dc61 100644
--- a/os/rt/src/chthreads.c
+++ b/os/rt/src/chthreads.c
@@ -640,15 +640,8 @@ msg_t chThdEnqueueTimeoutS(threads_queue_t *tqp, systime_t timeout) {
*/
void chThdDequeueNextI(threads_queue_t *tqp, msg_t msg) {
- if (queue_notempty(tqp)) {
- thread_t *tp = queue_fifo_remove(tqp);
-
- chDbgAssert(tp->p_state == CH_STATE_QUEUED,
- "not CH_STATE_QUEUED");
-
- tp->p_u.rdymsg = msg;
- chSchReadyI(tp);
- }
+ if (queue_notempty(tqp))
+ chThdDoDequeueNextI(tqp, msg);
}
/**
@@ -661,15 +654,8 @@ void chThdDequeueNextI(threads_queue_t *tqp, msg_t msg) {
*/
void chThdDequeueAllI(threads_queue_t *tqp, msg_t msg) {
- while (queue_notempty(tqp)) {
- thread_t *tp = queue_fifo_remove(tqp);
-
- chDbgAssert(tp->p_state == CH_STATE_QUEUED,
- "not CH_STATE_QUEUED");
-
- tp->p_u.rdymsg = msg;
- chSchReadyI(tp);
- }
+ while (queue_notempty(tqp))
+ chThdDoDequeueNextI(tqp, msg);
}
/** @} */