forked from len0rd/rockbox
New scheduler, with priorities for swcodec platforms. Frequent task
switching should be more efficient and tasks are stored in linked lists to eliminate unnecessary task switching to improve performance. Audio should no longer skip on swcodec targets caused by too CPU hungry UI thread or background threads. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10958 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
baf5494341
commit
a85044bf9e
36 changed files with 834 additions and 413 deletions
|
|
@ -56,12 +56,14 @@ struct event
|
|||
struct event_queue
|
||||
{
|
||||
struct event events[QUEUE_LENGTH];
|
||||
struct thread_entry *thread;
|
||||
unsigned int read;
|
||||
unsigned int write;
|
||||
};
|
||||
|
||||
struct mutex
|
||||
{
|
||||
struct thread_entry *thread;
|
||||
bool locked;
|
||||
};
|
||||
|
||||
|
|
@ -85,7 +87,7 @@ extern void sleep(int ticks);
|
|||
int tick_add_task(void (*f)(void));
|
||||
int tick_remove_task(void (*f)(void));
|
||||
|
||||
extern void queue_init(struct event_queue *q);
|
||||
extern void queue_init(struct event_queue *q, bool register_queue);
|
||||
extern void queue_delete(struct event_queue *q);
|
||||
extern void queue_wait(struct event_queue *q, struct event *ev);
|
||||
extern void queue_wait_w_tmo(struct event_queue *q, struct event *ev, int ticks);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue