Oops, sim was missing a queue function
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11421 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
021413ad5e
commit
46925b32a7
1 changed files with 14 additions and 0 deletions
|
@ -38,6 +38,7 @@ void queue_init(struct event_queue *q, bool register_queue)
|
|||
|
||||
q->read = 0;
|
||||
q->write = 0;
|
||||
q->thread = NULL;
|
||||
}
|
||||
|
||||
void queue_delete(struct event_queue *q)
|
||||
|
@ -99,6 +100,19 @@ void queue_clear(struct event_queue* q)
|
|||
q->write = 0;
|
||||
}
|
||||
|
||||
void queue_remove_from_head(struct event_queue *q, long id)
|
||||
{
|
||||
int oldlevel = set_irq_level(15<<4);
|
||||
|
||||
while (q->read != q->write &&
|
||||
q->events[(q->read) & QUEUE_LENGTH_MASK].id == id)
|
||||
{
|
||||
q->read++;
|
||||
}
|
||||
|
||||
set_irq_level(oldlevel);
|
||||
}
|
||||
|
||||
void switch_thread(bool save_context, struct thread_entry **blocked_list)
|
||||
{
|
||||
(void)save_context;
|
||||
|
|
Loading…
Reference in a new issue