diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2007-08-04 00:48:57 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2007-08-04 00:48:57 +0000 |
commit | ffbbc60f38ddc8aeadc9cea1102077e22ca84a1a (patch) | |
tree | 1fed8abdcd61d6093842a64b207bb110d69a7f6c /apps/plugins/mpegplayer/mpegplayer.c | |
parent | 8edfff979b9bd65145f5b6d5a83bb86f64d84dde (diff) |
Mpegplayer: Clear up some other cache issues. Use the better sleep loops for message sending. I still won't promise 100% trouble-free operation on dual-core since adding a thread to the COP from the CPU is a race condition anyway.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14173 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/mpegplayer/mpegplayer.c')
-rw-r--r-- | apps/plugins/mpegplayer/mpegplayer.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c index a0659a9f0d..273e01b797 100644 --- a/apps/plugins/mpegplayer/mpegplayer.c +++ b/apps/plugins/mpegplayer/mpegplayer.c @@ -227,15 +227,10 @@ static inline bool str_have_msg(Stream *str) /* Waits until a message is sent */ static void str_wait_msg(Stream *str) { - /* NOTE: sleep(0) caused a prefectch abort at C0EDBABE on e200 - - will look into this oddness */ -#if 0 int spin_count = 0; -#endif while (str->have_msg == 0) { -#if 0 if (spin_count < 100) { rb->yield(); @@ -244,8 +239,6 @@ static void str_wait_msg(Stream *str) } rb->sleep(0); -#endif - rb->yield(); } } @@ -285,12 +278,7 @@ static void str_reply_msg(Stream *str, int reply) /* Sends a message to a stream and waits for a reply */ static intptr_t str_send_msg(Stream *str, int id, intptr_t data) { - /* NOTE: sleep(0) caused a prefectch abort at C0EDBABE on e200 - - will look into this oddness */ -#if 0 int spin_count = 0; -#endif - intptr_t reply; #if 0 @@ -309,7 +297,6 @@ static intptr_t str_send_msg(Stream *str, int id, intptr_t data) while (str->replied == 0 && str->status != STREAM_TERMINATED) { -#if 0 if (spin_count < 100) { rb->yield(); @@ -318,8 +305,6 @@ static intptr_t str_send_msg(Stream *str, int id, intptr_t data) } rb->sleep(0); -#endif - rb->yield(); } reply = str->reply; @@ -1926,6 +1911,8 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) init_stream_lock(); + flush_icache(); + /* We put the video thread on the second processor for multi-core targets. */ if ((video_str.thread = rb->create_thread(video_thread, (uint8_t*)video_stack,VIDEO_STACKSIZE,"mpgvideo" IF_PRIO(,PRIORITY_PLAYBACK) |