mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-12 14:42:31 -05:00
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
This commit is contained in:
parent
a83214d16f
commit
dc838d26ff
2 changed files with 8 additions and 1 deletions
|
|
@ -245,6 +245,6 @@ int button_status(void)
|
|||
|
||||
void button_clear_queue(void)
|
||||
{
|
||||
queue_empty(&button_queue);
|
||||
queue_clear(&button_queue);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 ();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue