summaryrefslogtreecommitdiff
path: root/apps/tagcache.c
diff options
context:
space:
mode:
authorMiika Pekkarinen <miipekk@ihme.org>2006-09-16 16:18:11 +0000
committerMiika Pekkarinen <miipekk@ihme.org>2006-09-16 16:18:11 +0000
commita85044bf9eaa0a7206c1978d3cfd57ab2d7fae2f (patch)
treea30695ed540bf32365d577f46398f712c7a494c4 /apps/tagcache.c
parentbaf5494341cdd6cdb9590e21d429920b9bc4a2c6 (diff)
downloadrockbox-a85044bf9eaa0a7206c1978d3cfd57ab2d7fae2f.tar.gz
rockbox-a85044bf9eaa0a7206c1978d3cfd57ab2d7fae2f.zip
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
Diffstat (limited to 'apps/tagcache.c')
-rw-r--r--apps/tagcache.c9
1 files changed, 5 insertions, 4 deletions
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 @@
54 */ 54 */
55 55
56#include <stdio.h> 56#include <stdio.h>
57#include "config.h"
57#include "thread.h" 58#include "thread.h"
58#include "kernel.h" 59#include "kernel.h"
59#include "system.h" 60#include "system.h"
@@ -1062,7 +1063,6 @@ static bool get_next(struct tagcache_search *tcs)
1062 1063
1063 if (tagcache_is_numeric_tag(tcs->type)) 1064 if (tagcache_is_numeric_tag(tcs->type))
1064 { 1065 {
1065 logf("r:%d", tcs->position);
1066 snprintf(buf, sizeof(buf), "%d", tcs->position); 1066 snprintf(buf, sizeof(buf), "%d", tcs->position);
1067 tcs->result_seek = tcs->position; 1067 tcs->result_seek = tcs->position;
1068 tcs->result = buf; 1068 tcs->result = buf;
@@ -3455,7 +3455,6 @@ static void tagcache_thread(void)
3455 sleep(HZ); 3455 sleep(HZ);
3456 stat.ready = check_all_headers(); 3456 stat.ready = check_all_headers();
3457 3457
3458
3459 while (1) 3458 while (1)
3460 { 3459 {
3461 queue_wait_w_tmo(&tagcache_queue, &ev, HZ); 3460 queue_wait_w_tmo(&tagcache_queue, &ev, HZ);
@@ -3503,6 +3502,7 @@ static void tagcache_thread(void)
3503 3502
3504 3503
3505 logf("tagcache check done"); 3504 logf("tagcache check done");
3505
3506 check_done = true; 3506 check_done = true;
3507 break ; 3507 break ;
3508 3508
@@ -3612,9 +3612,10 @@ void tagcache_init(void)
3612 current_serial = 0; 3612 current_serial = 0;
3613 write_lock = read_lock = 0; 3613 write_lock = read_lock = 0;
3614 3614
3615 queue_init(&tagcache_queue); 3615 queue_init(&tagcache_queue, true);
3616 create_thread(tagcache_thread, tagcache_stack, 3616 create_thread(tagcache_thread, tagcache_stack,
3617 sizeof(tagcache_stack), tagcache_thread_name); 3617 sizeof(tagcache_stack), tagcache_thread_name
3618 IF_PRIO(, PRIORITY_BACKGROUND));
3618} 3619}
3619 3620
3620bool tagcache_is_initialized(void) 3621bool tagcache_is_initialized(void)