summaryrefslogtreecommitdiffstats
path: root/uisimulator/sdl/kernel.c
diff options
context:
space:
mode:
Diffstat (limited to 'uisimulator/sdl/kernel.c')
-rw-r--r--uisimulator/sdl/kernel.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/uisimulator/sdl/kernel.c b/uisimulator/sdl/kernel.c
index 8918ff7e12..98d509f6a6 100644
--- a/uisimulator/sdl/kernel.c
+++ b/uisimulator/sdl/kernel.c
@@ -281,6 +281,11 @@ void queue_remove_from_head(struct event_queue *q, long id)
set_irq_level(oldlevel);
}
+int queue_count(const struct event_queue *q)
+{
+ return q->write - q->read;
+}
+
void switch_thread(bool save_context, struct thread_entry **blocked_list)
{
(void)save_context;