mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
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
This commit is contained in:
parent
8edfff979b
commit
ffbbc60f38
1 changed files with 2 additions and 15 deletions
|
@ -227,15 +227,10 @@ static inline bool str_have_msg(Stream *str)
|
||||||
/* Waits until a message is sent */
|
/* Waits until a message is sent */
|
||||||
static void str_wait_msg(Stream *str)
|
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;
|
int spin_count = 0;
|
||||||
#endif
|
|
||||||
|
|
||||||
while (str->have_msg == 0)
|
while (str->have_msg == 0)
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
if (spin_count < 100)
|
if (spin_count < 100)
|
||||||
{
|
{
|
||||||
rb->yield();
|
rb->yield();
|
||||||
|
@ -244,8 +239,6 @@ static void str_wait_msg(Stream *str)
|
||||||
}
|
}
|
||||||
|
|
||||||
rb->sleep(0);
|
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 */
|
/* Sends a message to a stream and waits for a reply */
|
||||||
static intptr_t str_send_msg(Stream *str, int id, intptr_t data)
|
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;
|
int spin_count = 0;
|
||||||
#endif
|
|
||||||
|
|
||||||
intptr_t reply;
|
intptr_t reply;
|
||||||
|
|
||||||
#if 0
|
#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)
|
while (str->replied == 0 && str->status != STREAM_TERMINATED)
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
if (spin_count < 100)
|
if (spin_count < 100)
|
||||||
{
|
{
|
||||||
rb->yield();
|
rb->yield();
|
||||||
|
@ -318,8 +305,6 @@ static intptr_t str_send_msg(Stream *str, int id, intptr_t data)
|
||||||
}
|
}
|
||||||
|
|
||||||
rb->sleep(0);
|
rb->sleep(0);
|
||||||
#endif
|
|
||||||
rb->yield();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
reply = str->reply;
|
reply = str->reply;
|
||||||
|
@ -1926,6 +1911,8 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
||||||
|
|
||||||
init_stream_lock();
|
init_stream_lock();
|
||||||
|
|
||||||
|
flush_icache();
|
||||||
|
|
||||||
/* We put the video thread on the second processor for multi-core targets. */
|
/* We put the video thread on the second processor for multi-core targets. */
|
||||||
if ((video_str.thread = rb->create_thread(video_thread,
|
if ((video_str.thread = rb->create_thread(video_thread,
|
||||||
(uint8_t*)video_stack,VIDEO_STACKSIZE,"mpgvideo" IF_PRIO(,PRIORITY_PLAYBACK)
|
(uint8_t*)video_stack,VIDEO_STACKSIZE,"mpgvideo" IF_PRIO(,PRIORITY_PLAYBACK)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue