summaryrefslogtreecommitdiff
path: root/uisimulator/sdl
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2007-09-30 17:23:13 +0000
committerMichael Sevakis <jethead71@rockbox.org>2007-09-30 17:23:13 +0000
commit035529c487feb5a0e1d951b1ac8f82c23cfbff62 (patch)
treeeab78bdc524e60fd61c8626f6ce560c1357e7d76 /uisimulator/sdl
parent3f9a9a1a01df7c73b569232f96a4170ed8910ea2 (diff)
Enable auto reply for queue messages sent with queue_send. It's only nescessary to use queue_reply to return a value other than zero or to return a result before waiting on the queue again.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14923 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator/sdl')
-rw-r--r--uisimulator/sdl/kernel.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/uisimulator/sdl/kernel.c b/uisimulator/sdl/kernel.c
index ff6c94933b..e2aa0d31c4 100644
--- a/uisimulator/sdl/kernel.c
+++ b/uisimulator/sdl/kernel.c
@@ -159,6 +159,14 @@ void queue_wait(struct event_queue *q, struct event *ev)
{
unsigned int rd;
+#ifdef HAVE_EXTENDED_MESSAGING_AND_NAME
+ if (q->send && q->send->curr_sender)
+ {
+ /* auto-reply */
+ queue_release_sender(&q->send->curr_sender, 0);
+ }
+#endif
+
if (q->read == q->write)
{
block_thread(&q->thread);
@@ -178,6 +186,14 @@ void queue_wait(struct event_queue *q, struct event *ev)
void queue_wait_w_tmo(struct event_queue *q, struct event *ev, int ticks)
{
+#ifdef HAVE_EXTENDED_MESSAGING_AND_NAME
+ if (q->send && q->send->curr_sender)
+ {
+ /* auto-reply */
+ queue_release_sender(&q->send->curr_sender, 0);
+ }
+#endif
+
if (q->read == q->write && ticks > 0)
{
block_thread_w_tmo(&q->thread, ticks);