From a85044bf9eaa0a7206c1978d3cfd57ab2d7fae2f Mon Sep 17 00:00:00 2001 From: Miika Pekkarinen Date: Sat, 16 Sep 2006 16:18:11 +0000 Subject: 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 --- apps/tagcache.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'apps/tagcache.c') diff --git a/apps/tagcache.c b/apps/tagcache.c index 2ed80a860b..f478598dad 100644 --- a/apps/tagcache.c +++ b/apps/tagcache.c @@ -54,6 +54,7 @@ */ #include +#include "config.h" #include "thread.h" #include "kernel.h" #include "system.h" @@ -1062,7 +1063,6 @@ static bool get_next(struct tagcache_search *tcs) if (tagcache_is_numeric_tag(tcs->type)) { - logf("r:%d", tcs->position); snprintf(buf, sizeof(buf), "%d", tcs->position); tcs->result_seek = tcs->position; tcs->result = buf; @@ -3455,7 +3455,6 @@ static void tagcache_thread(void) sleep(HZ); stat.ready = check_all_headers(); - while (1) { queue_wait_w_tmo(&tagcache_queue, &ev, HZ); @@ -3503,6 +3502,7 @@ static void tagcache_thread(void) logf("tagcache check done"); + check_done = true; break ; @@ -3612,9 +3612,10 @@ void tagcache_init(void) current_serial = 0; write_lock = read_lock = 0; - queue_init(&tagcache_queue); + queue_init(&tagcache_queue, true); create_thread(tagcache_thread, tagcache_stack, - sizeof(tagcache_stack), tagcache_thread_name); + sizeof(tagcache_stack), tagcache_thread_name + IF_PRIO(, PRIORITY_BACKGROUND)); } bool tagcache_is_initialized(void) -- cgit v1.2.3