diff options
author | Michael Giacomelli <giac2000@hotmail.com> | 2008-09-20 22:13:39 +0000 |
---|---|---|
committer | Michael Giacomelli <giac2000@hotmail.com> | 2008-09-20 22:13:39 +0000 |
commit | ccd56bf22069ecb8f228dea0738c1ae2eba04a39 (patch) | |
tree | 39995332648c15044d20db7b771c3b726c4f0e51 /apps | |
parent | 4e36a2b991d58a40d7ea12c9bf41e93736b8b024 (diff) | |
download | rockbox-ccd56bf22069ecb8f228dea0738c1ae2eba04a39.tar.gz rockbox-ccd56bf22069ecb8f228dea0738c1ae2eba04a39.zip |
Fix test_codec on multiprocessor codecs (MP3, SPC).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18558 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/plugin.c | 8 | ||||
-rw-r--r-- | apps/plugin.h | 11 | ||||
-rw-r--r-- | apps/plugins/test_codec.c | 13 |
3 files changed, 31 insertions, 1 deletions
diff --git a/apps/plugin.c b/apps/plugin.c index 6889248402..b03ed3109a 100644 --- a/apps/plugin.c +++ b/apps/plugin.c | |||
@@ -606,6 +606,14 @@ static const struct plugin_api rockbox_api = { | |||
606 | search_albumart_files, | 606 | search_albumart_files, |
607 | #endif | 607 | #endif |
608 | 608 | ||
609 | thread_thaw, | ||
610 | semaphore_init, | ||
611 | semaphore_wait, | ||
612 | semaphore_release, | ||
613 | event_init, | ||
614 | event_wait, | ||
615 | event_set_state, | ||
616 | |||
609 | /* new stuff at the end, sort into place next time | 617 | /* new stuff at the end, sort into place next time |
610 | the API gets incompatible */ | 618 | the API gets incompatible */ |
611 | 619 | ||
diff --git a/apps/plugin.h b/apps/plugin.h index 1f7cfa28ef..6dd81caf7e 100644 --- a/apps/plugin.h +++ b/apps/plugin.h | |||
@@ -130,7 +130,7 @@ void* plugin_get_buffer(size_t *buffer_size); | |||
130 | #define PLUGIN_MAGIC 0x526F634B /* RocK */ | 130 | #define PLUGIN_MAGIC 0x526F634B /* RocK */ |
131 | 131 | ||
132 | /* increase this every time the api struct changes */ | 132 | /* increase this every time the api struct changes */ |
133 | #define PLUGIN_API_VERSION 123 | 133 | #define PLUGIN_API_VERSION 124 |
134 | 134 | ||
135 | /* update this to latest version if a change to the api struct breaks | 135 | /* update this to latest version if a change to the api struct breaks |
136 | backwards compatibility (and please take the opportunity to sort in any | 136 | backwards compatibility (and please take the opportunity to sort in any |
@@ -763,6 +763,15 @@ struct plugin_api { | |||
763 | char *buf, int buflen); | 763 | char *buf, int buflen); |
764 | #endif | 764 | #endif |
765 | 765 | ||
766 | void (*thread_thaw)(struct thread_entry *thread); | ||
767 | void (*semaphore_init)(struct semaphore *s, int max, int start); | ||
768 | void (*semaphore_wait)(struct semaphore *s); | ||
769 | void (*semaphore_release)(struct semaphore *s); | ||
770 | void (*event_init)(struct event *e, unsigned int flags); | ||
771 | void (*event_wait)(struct event *e, unsigned int for_state); | ||
772 | void (*event_set_state)(struct event *e, unsigned int state); | ||
773 | |||
774 | |||
766 | /* new stuff at the end, sort into place next time | 775 | /* new stuff at the end, sort into place next time |
767 | the API gets incompatible */ | 776 | the API gets incompatible */ |
768 | 777 | ||
diff --git a/apps/plugins/test_codec.c b/apps/plugins/test_codec.c index 542f6edf2f..5eb9ad3988 100644 --- a/apps/plugins/test_codec.c +++ b/apps/plugins/test_codec.c | |||
@@ -485,6 +485,19 @@ static void init_ci(void) | |||
485 | ci.invalidate_icache = invalidate_icache; | 485 | ci.invalidate_icache = invalidate_icache; |
486 | ci.flush_icache = flush_icache; | 486 | ci.flush_icache = flush_icache; |
487 | #endif | 487 | #endif |
488 | |||
489 | #if NUM_CORES > 1 | ||
490 | ci.create_thread = rb->create_thread; | ||
491 | ci.thread_thaw = rb->thread_thaw; | ||
492 | ci.thread_wait = rb->thread_wait; | ||
493 | ci.semaphore_init = rb->semaphore_init; | ||
494 | ci.semaphore_wait = rb->semaphore_wait; | ||
495 | ci.semaphore_release = rb->semaphore_release; | ||
496 | ci.event_init = rb->event_init; | ||
497 | ci.event_wait = rb->event_wait; | ||
498 | ci.event_set_state = rb->event_set_state; | ||
499 | #endif | ||
500 | |||
488 | } | 501 | } |
489 | 502 | ||
490 | static void codec_thread(void) | 503 | static void codec_thread(void) |