summaryrefslogtreecommitdiffstats
path: root/uisimulator
diff options
context:
space:
mode:
Diffstat (limited to 'uisimulator')
-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 ();