diff options
| author | Daniel Ankers <dan@weirdo.org.uk> | 2007-03-04 20:06:41 +0000 |
|---|---|---|
| committer | Daniel Ankers <dan@weirdo.org.uk> | 2007-03-04 20:06:41 +0000 |
| commit | 82f9056988331572e01231d70fadc64b7ab76c6f (patch) | |
| tree | 9f1d33b904516fd5eeac2067e4afb32ce5e990df /apps/plugins | |
| parent | 74e572c9d600247ee795b206da3715f6af442a25 (diff) | |
| download | rockbox-82f9056988331572e01231d70fadc64b7ab76c6f.zip rockbox-82f9056988331572e01231d70fadc64b7ab76c6f.tar.gz rockbox-82f9056988331572e01231d70fadc64b7ab76c6f.tar.bz2 rockbox-82f9056988331572e01231d70fadc64b7ab76c6f.tar.xz | |
Dual core support for PP502x players (iPod G4 and later, iriver h10, Sansa - iPod G3 will be coming soon.) This allows threads to be run on either core provided that all communications between the cores is done using uncached memory. There should be no significant change in battery life from doing this. Documentation (on the RockboxKernel wiki page) will follow shortly.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12601 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
| -rw-r--r-- | apps/plugins/alpine_cdc.c | 3 | ||||
| -rw-r--r-- | apps/plugins/battery_bench.c | 3 | ||||
| -rw-r--r-- | apps/plugins/mpegplayer/mpegplayer.c | 10 |
3 files changed, 8 insertions, 8 deletions
diff --git a/apps/plugins/alpine_cdc.c b/apps/plugins/alpine_cdc.c index 9c1bc8b..9cc1f9c 100644 --- a/apps/plugins/alpine_cdc.c +++ b/apps/plugins/alpine_cdc.c @@ -1171,7 +1171,8 @@ int main(void* parameter) rb->memset(&gTread, 0, sizeof(gTread)); gTread.foreground = true; rb->create_thread(thread, stack, stacksize, "CDC" - IF_PRIO(, PRIORITY_BACKGROUND)); + IF_PRIO(, PRIORITY_BACKGROUND) + IF_COP(, CPU, false)); #ifdef DEBUG do diff --git a/apps/plugins/battery_bench.c b/apps/plugins/battery_bench.c index fff3c2f..6e31782 100644 --- a/apps/plugins/battery_bench.c +++ b/apps/plugins/battery_bench.c @@ -479,7 +479,8 @@ int main(void) rb->queue_init(&thread_q, true); /* put the thread's queue in the bcast list */ if(rb->create_thread(thread, thread_stack, sizeof(thread_stack), "Battery Benchmark" - IF_PRIO(, PRIORITY_BACKGROUND)) == NULL) + IF_PRIO(, PRIORITY_BACKGROUND) + IF_COP(, CPU, false)) == NULL) { rb->splash(HZ,true,"Cannot create thread!"); return PLUGIN_ERROR; diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c index 36f54dc..684a491 100644 --- a/apps/plugins/mpegplayer/mpegplayer.c +++ b/apps/plugins/mpegplayer/mpegplayer.c @@ -909,19 +909,17 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) videostatus = STREAM_PLAYING; /* We put the video thread on the second processor for multi-core targets. */ -#if NUM_CORES > 1 - if ((videothread_id = rb->create_thread_on_core(COP,decode_mpeg2, -#else if ((videothread_id = rb->create_thread(decode_mpeg2, -#endif - (uint8_t*)video_stack,VIDEO_STACKSIZE,"mpgvideo" IF_PRIO(,PRIORITY_PLAYBACK))) == NULL) + (uint8_t*)video_stack,VIDEO_STACKSIZE,"mpgvideo" IF_PRIO(,PRIORITY_PLAYBACK) + IF_COP(, COP, true))) == NULL) { rb->splash(HZ,true,"Cannot create video thread!"); return PLUGIN_ERROR; } if ((audiothread_id = rb->create_thread(mad_decode, - (uint8_t*)audio_stack,AUDIO_STACKSIZE,"mpgaudio" IF_PRIO(,PRIORITY_PLAYBACK))) == NULL) + (uint8_t*)audio_stack,AUDIO_STACKSIZE,"mpgaudio" IF_PRIO(,PRIORITY_PLAYBACK) + IF_COP(, CPU, false))) == NULL) { rb->splash(HZ,true,"Cannot create audio thread!"); rb->remove_thread(videothread_id); |