summaryrefslogtreecommitdiffstats
path: root/uisimulator
diff options
context:
space:
mode:
authorSteve Bavin <pondlife@pondlife.me>2006-11-03 10:12:15 +0000
committerSteve Bavin <pondlife@pondlife.me>2006-11-03 10:12:15 +0000
commit46925b32a78514006bed76882a730467cc489808 (patch)
treeb0e3d55585fafcccad6d674320ae4f289e1c5f25 /uisimulator
parent021413ad5e5df1559726547a933b880098aa0464 (diff)
downloadrockbox-46925b32a78514006bed76882a730467cc489808.tar.gz
rockbox-46925b32a78514006bed76882a730467cc489808.tar.bz2
rockbox-46925b32a78514006bed76882a730467cc489808.zip
Oops, sim was missing a queue function
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11421 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator')
-rw-r--r--uisimulator/sdl/kernel.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/uisimulator/sdl/kernel.c b/uisimulator/sdl/kernel.c
index bfe6062450..f1eb095e7b 100644
--- a/uisimulator/sdl/kernel.c
+++ b/uisimulator/sdl/kernel.c
@@ -38,6 +38,7 @@ void queue_init(struct event_queue *q, bool register_queue)
q->read = 0;
q->write = 0;
+ q->thread = NULL;
}
void queue_delete(struct event_queue *q)
@@ -99,6 +100,19 @@ void queue_clear(struct event_queue* q)
q->write = 0;
}
+void queue_remove_from_head(struct event_queue *q, long id)
+{
+ int oldlevel = set_irq_level(15<<4);
+
+ while (q->read != q->write &&
+ q->events[(q->read) & QUEUE_LENGTH_MASK].id == id)
+ {
+ q->read++;
+ }
+
+ set_irq_level(oldlevel);
+}
+
void switch_thread(bool save_context, struct thread_entry **blocked_list)
{
(void)save_context;