summaryrefslogtreecommitdiff
path: root/firmware/kernel/queue.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/kernel/queue.c')
-rw-r--r--firmware/kernel/queue.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/firmware/kernel/queue.c b/firmware/kernel/queue.c
index 379e3f6..22a8da9 100644
--- a/firmware/kernel/queue.c
+++ b/firmware/kernel/queue.c
@@ -84,7 +84,7 @@ static void queue_release_sender(struct thread_entry * volatile * sender,
*thread->bqp = thread; /* Move blocking queue head to thread since
wakeup_thread wakes the first thread in
the list. */
- wakeup_thread(thread->bqp);
+ wakeup_thread(thread->bqp, WAKEUP_RELEASE);
}
/* Releases any waiting threads that are queued with queue_send -
@@ -108,16 +108,16 @@ static void queue_release_all_senders(struct event_queue *q)
}
}
+#ifdef HAVE_WAKEUP_EXT_CB
/* Callback to do extra forced removal steps from sender list in addition
* to the normal blocking queue removal and priority dis-inherit */
static void queue_remove_sender_thread_cb(struct thread_entry *thread)
{
*((struct thread_entry **)thread->retval) = NULL;
-#ifdef HAVE_WAKEUP_EXT_CB
thread->wakeup_ext_cb = NULL;
-#endif
thread->retval = 0;
}
+#endif /* HAVE_WAKEUP_EXT_CB */
/* Enables queue_send on the specified queue - caller allocates the extra
* data structure. Only queues which are taken to be owned by a thread should
@@ -139,7 +139,6 @@ void queue_enable_queue_send(struct event_queue *q,
{
memset(send, 0, sizeof(*send));
#ifdef HAVE_PRIORITY_SCHEDULING
- send->blocker.wakeup_protocol = wakeup_priority_protocol_release;
send->blocker.priority = PRIORITY_IDLE;
if(owner_id != 0)
{
@@ -268,7 +267,7 @@ void queue_delete(struct event_queue *q)
corelock_unlock(&all_queues.cl);
/* Release thread(s) waiting on queue head */
- thread_queue_wake(&q->queue);
+ thread_queue_wake(&q->queue, NULL);
#ifdef HAVE_EXTENDED_MESSAGING_AND_NAME
if(q->send)
@@ -325,7 +324,7 @@ void queue_wait(struct event_queue *q, struct queue_event *ev)
IF_COP( current->obj_cl = &q->cl; )
current->bqp = &q->queue;
- block_thread(current);
+ block_thread(current, TIMEOUT_BLOCK);
corelock_unlock(&q->cl);
switch_thread();
@@ -386,7 +385,7 @@ void queue_wait_w_tmo(struct event_queue *q, struct queue_event *ev, int ticks)
IF_COP( current->obj_cl = &q->cl; )
current->bqp = &q->queue;
- block_thread_w_tmo(current, ticks);
+ block_thread(current, ticks);
corelock_unlock(&q->cl);
switch_thread();
@@ -443,7 +442,7 @@ void queue_post(struct event_queue *q, long id, intptr_t data)
queue_do_unblock_sender(q->send, wr);
/* Wakeup a waiting thread if any */
- wakeup_thread(&q->queue);
+ wakeup_thread(&q->queue, WAKEUP_DEFAULT);
corelock_unlock(&q->cl);
restore_irq(oldlevel);
@@ -481,7 +480,7 @@ intptr_t queue_send(struct event_queue *q, long id, intptr_t data)
}
/* Wakeup a waiting thread if any */
- wakeup_thread(&q->queue);
+ wakeup_thread(&q->queue, WAKEUP_DEFAULT);
/* Save thread in slot, add to list and wait for reply */
*spp = current;
@@ -493,7 +492,7 @@ intptr_t queue_send(struct event_queue *q, long id, intptr_t data)
current->retval = (intptr_t)spp;
current->bqp = &send->list;
- block_thread(current);
+ block_thread(current, TIMEOUT_BLOCK);
corelock_unlock(&q->cl);
switch_thread();
@@ -502,7 +501,7 @@ intptr_t queue_send(struct event_queue *q, long id, intptr_t data)
}
/* Function as queue_post if sending is not enabled */
- wakeup_thread(&q->queue);
+ wakeup_thread(&q->queue, WAKEUP_DEFAULT);
corelock_unlock(&q->cl);
restore_irq(oldlevel);