diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2007-10-16 01:25:17 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2007-10-16 01:25:17 +0000 |
commit | a9b2fb5ee3114fe835f6515b6aeae7454f66d821 (patch) | |
tree | fc4e96d0c1f215565918406c8827b16b806c1345 /apps/tagcache.c | |
parent | a3fbbc9fa7e12fd3fce122bbd235dc362050e024 (diff) | |
download | rockbox-a9b2fb5ee3114fe835f6515b6aeae7454f66d821.tar.gz rockbox-a9b2fb5ee3114fe835f6515b6aeae7454f66d821.zip |
Finally full multicore support for PortalPlayer 502x targets with an eye towards the possibility of other types. All SVN targets the low-lag code to speed up blocking operations. Most files are modified here simple due to a name change to actually support a real event object and a param change to create_thread. Add some use of new features but just sit on things for a bit and leave full integration for later. Work will continue on to address size on sensitive targets and simplify things if possible. Any PP target having problems with SWP can easily be changed to sw corelocks with one #define change in config.h though only PP5020 has shown an issue and seems to work without any difficulties.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15134 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/tagcache.c')
-rw-r--r-- | apps/tagcache.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/tagcache.c b/apps/tagcache.c index 4a2f107d24..2ed7574f3b 100644 --- a/apps/tagcache.c +++ b/apps/tagcache.c | |||
@@ -88,7 +88,7 @@ | |||
88 | 88 | ||
89 | #ifndef __PCTOOL__ | 89 | #ifndef __PCTOOL__ |
90 | /* Tag Cache thread. */ | 90 | /* Tag Cache thread. */ |
91 | static struct event_queue tagcache_queue; | 91 | static struct event_queue tagcache_queue NOCACHEBSS_ATTR; |
92 | static long tagcache_stack[(DEFAULT_STACK_SIZE + 0x4000)/sizeof(long)]; | 92 | static long tagcache_stack[(DEFAULT_STACK_SIZE + 0x4000)/sizeof(long)]; |
93 | static const char tagcache_thread_name[] = "tagcache"; | 93 | static const char tagcache_thread_name[] = "tagcache"; |
94 | #endif | 94 | #endif |
@@ -152,7 +152,7 @@ struct tagcache_command_entry { | |||
152 | static struct tagcache_command_entry command_queue[TAGCACHE_COMMAND_QUEUE_LENGTH]; | 152 | static struct tagcache_command_entry command_queue[TAGCACHE_COMMAND_QUEUE_LENGTH]; |
153 | static volatile int command_queue_widx = 0; | 153 | static volatile int command_queue_widx = 0; |
154 | static volatile int command_queue_ridx = 0; | 154 | static volatile int command_queue_ridx = 0; |
155 | static struct mutex command_queue_mutex; | 155 | static struct mutex command_queue_mutex NOCACHEBSS_ATTR; |
156 | /* Timestamp of the last added event, so we can wait a bit before committing the | 156 | /* Timestamp of the last added event, so we can wait a bit before committing the |
157 | * whole queue at once. */ | 157 | * whole queue at once. */ |
158 | static long command_queue_timestamp = 0; | 158 | static long command_queue_timestamp = 0; |
@@ -3377,7 +3377,7 @@ static bool delete_entry(long idx_id) | |||
3377 | */ | 3377 | */ |
3378 | static bool check_event_queue(void) | 3378 | static bool check_event_queue(void) |
3379 | { | 3379 | { |
3380 | struct event ev; | 3380 | struct queue_event ev; |
3381 | 3381 | ||
3382 | queue_wait_w_tmo(&tagcache_queue, &ev, 0); | 3382 | queue_wait_w_tmo(&tagcache_queue, &ev, 0); |
3383 | switch (ev.id) | 3383 | switch (ev.id) |
@@ -3972,7 +3972,7 @@ void tagcache_unload_ramcache(void) | |||
3972 | #ifndef __PCTOOL__ | 3972 | #ifndef __PCTOOL__ |
3973 | static void tagcache_thread(void) | 3973 | static void tagcache_thread(void) |
3974 | { | 3974 | { |
3975 | struct event ev; | 3975 | struct queue_event ev; |
3976 | bool check_done = false; | 3976 | bool check_done = false; |
3977 | 3977 | ||
3978 | /* If the previous cache build/update was interrupted, commit | 3978 | /* If the previous cache build/update was interrupted, commit |
@@ -4176,9 +4176,9 @@ void tagcache_init(void) | |||
4176 | mutex_init(&command_queue_mutex); | 4176 | mutex_init(&command_queue_mutex); |
4177 | queue_init(&tagcache_queue, true); | 4177 | queue_init(&tagcache_queue, true); |
4178 | create_thread(tagcache_thread, tagcache_stack, | 4178 | create_thread(tagcache_thread, tagcache_stack, |
4179 | sizeof(tagcache_stack), tagcache_thread_name | 4179 | sizeof(tagcache_stack), 0, tagcache_thread_name |
4180 | IF_PRIO(, PRIORITY_BACKGROUND) | 4180 | IF_PRIO(, PRIORITY_BACKGROUND) |
4181 | IF_COP(, CPU, false)); | 4181 | IF_COP(, CPU)); |
4182 | #else | 4182 | #else |
4183 | tc_stat.initialized = true; | 4183 | tc_stat.initialized = true; |
4184 | allocate_tempbuf(); | 4184 | allocate_tempbuf(); |