aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/osal/nil/osal.c
diff options
context:
space:
mode:
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++;
- }
-}
-
/** @} */