summaryrefslogtreecommitdiff
path: root/uisimulator/win32/kernel.c
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-02-28 00:33:15 +0000
committerJens Arnold <amiconn@rockbox.org>2005-02-28 00:33:15 +0000
commitdc838d26ffef2b1617fd279383f3789f7cd0ca2b (patch)
treea2a9e6d83ef6c2ddb778d95eef4c6b3c19331d2d /uisimulator/win32/kernel.c
parenta83214d16f58ce22f0b2b1ea43de857f8ecb7dde (diff)
Fix: really clear the button queue when it is meant to be cleared.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6074 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator/win32/kernel.c')
-rw-r--r--uisimulator/win32/kernel.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/uisimulator/win32/kernel.c b/uisimulator/win32/kernel.c
index f4043000cc..5de436007b 100644
--- a/uisimulator/win32/kernel.c
+++ b/uisimulator/win32/kernel.c
@@ -99,6 +99,13 @@ bool queue_empty(const struct event_queue* q)
return ( q->read == q->write );
}
+void queue_clear(struct event_queue* q)
+{
+ /* fixme: This is potentially unsafe in case we do interrupt-like processing */
+ q->read = 0;
+ q->write = 0;
+}
+
void switch_thread (void)
{
yield ();