summaryrefslogtreecommitdiffstats
path: root/uisimulator/win32
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
parenta83214d16f58ce22f0b2b1ea43de857f8ecb7dde (diff)
downloadrockbox-dc838d26ffef2b1617fd279383f3789f7cd0ca2b.tar.gz
rockbox-dc838d26ffef2b1617fd279383f3789f7cd0ca2b.tar.bz2
rockbox-dc838d26ffef2b1617fd279383f3789f7cd0ca2b.zip
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')
-rw-r--r--uisimulator/win32/button.c2
-rw-r--r--uisimulator/win32/kernel.c7
2 files changed, 8 insertions, 1 deletions
diff --git a/uisimulator/win32/button.c b/uisimulator/win32/button.c
index f1828f1009..e9dacdda46 100644
--- a/uisimulator/win32/button.c
+++ b/uisimulator/win32/button.c
@@ -245,6 +245,6 @@ int button_status(void)
void button_clear_queue(void)
{
- queue_empty(&button_queue);
+ queue_clear(&button_queue);
}
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 ();