aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/osal/nil/osal.c
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2017-04-11 11:08:36 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2017-04-11 11:08:36 +0000
commit477baaed5a9158b120ba9a485b285ba218d0d5cd (patch)
tree78510dbe556d7479419e019a98f2914430482cd6 /os/hal/osal/nil/osal.c
parentca129dc5b437343cb35b38206363a9b5940971af (diff)
downloadChibiOS-477baaed5a9158b120ba9a485b285ba218d0d5cd.tar.gz
ChibiOS-477baaed5a9158b120ba9a485b285ba218d0d5cd.tar.bz2
ChibiOS-477baaed5a9158b120ba9a485b285ba218d0d5cd.zip
Threads queues completed in NIL.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10155 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/osal/nil/osal.c')
-rw-r--r--os/hal/osal/nil/osal.c64
1 files changed, 0 insertions, 64 deletions
diff --git a/os/hal/osal/nil/osal.c b/os/hal/osal/nil/osal.c
index e486641c5..863be6a75 100644
--- a/os/hal/osal/nil/osal.c
+++ b/os/hal/osal/nil/osal.c
@@ -48,68 +48,4 @@
/* Module exported functions. */
/*===========================================================================*/
-/**
- * @brief Dequeues and wakes up one thread from the queue, if any.
- *
- * @param[in] tqp pointer to the threads queue object
- * @param[in] msg the message code
- *
- * @iclass
- */
-void osalThreadDequeueNextI(threads_queue_t *tqp, msg_t msg) {
- semaphore_t *sp = &tqp->sem;
-
- if (chSemGetCounterI(&tqp->sem) < (cnt_t)0) {
- thread_t *tp = nil.threads;
- while (true) {
- /* Is this thread waiting on this semaphore?*/
- if (tp->u1.semp == sp) {
- sp->cnt++;
-
- chDbgAssert(NIL_THD_IS_WTSEM(tp), "not waiting");
-
- (void) chSchReadyI(tp, msg);
- return;
- }
- tp++;
-
- chDbgAssert(tp < &nil.threads[CH_CFG_NUM_THREADS],
- "pointer out of range");
- }
- }
-}
-
-/**
- * @brief Dequeues and wakes up all threads from the queue.
- *
- * @param[in] tqp pointer to the threads queue object
- * @param[in] msg the message code
- *
- * @iclass
- */
-void osalThreadDequeueAllI(threads_queue_t *tqp, msg_t msg) {
- semaphore_t *sp = &tqp->sem;
- thread_t *tp;
- cnt_t cnt;
-
- cnt = sp->cnt;
- sp->cnt = (cnt_t)0;
- tp = nil.threads;
- while (cnt < (cnt_t)0) {
-
- chDbgAssert(tp < &nil.threads[CH_CFG_NUM_THREADS],
- "pointer out of range");
-
- /* Is this thread waiting on this semaphore?*/
- if (tp->u1.semp == sp) {
-
- chDbgAssert(NIL_THD_IS_WTSEM(tp), "not waiting");
-
- cnt++;
- (void) chSchReadyI(tp, msg);
- }
- tp++;
- }
-}
-
/** @} */