summaryrefslogtreecommitdiff
path: root/apps/plugins/mpegplayer/video_thread.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2008-03-25 02:34:12 +0000
committerMichael Sevakis <jethead71@rockbox.org>2008-03-25 02:34:12 +0000
commit27cf67733936abd75fcb1f8da765977cd75906ee (patch)
treef894211a8a0c77b402dd3250b2bee2d17dcfe13f /apps/plugins/mpegplayer/video_thread.c
parentbc2f8fd8f38a3e010cd67bbac358f6e9991153c6 (diff)
downloadrockbox-27cf67733936abd75fcb1f8da765977cd75906ee.tar.gz
rockbox-27cf67733936abd75fcb1f8da765977cd75906ee.zip
Add a complete priority inheritance implementation to the scheduler (all mutex ownership and queue_send calls are inheritable). Priorities are differential so that dispatch depends on the runnable range of priorities. Codec priority can therefore be raised in small steps (pcmbuf updated to enable). Simplify the kernel functions to ease implementation and use the same kernel.c for both sim and target (I'm tired of maintaining two ;_). 1) Not sure if a minor audio break at first buffering issue will exist on large-sector disks (the main mutex speed issue was genuinely resolved earlier). At this point it's best dealt with at the buffering level. It seems a larger filechunk could be used again. 2) Perhaps 64-bit sims will have some minor issues (finicky) but a backroll of the code of concern there is a 5-minute job. All kernel objects become incompatible so a full rebuild and update is needed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16791 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/mpegplayer/video_thread.c')
-rw-r--r--apps/plugins/mpegplayer/video_thread.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/plugins/mpegplayer/video_thread.c b/apps/plugins/mpegplayer/video_thread.c
index 6508d28d1d..d16eb771b0 100644
--- a/apps/plugins/mpegplayer/video_thread.c
+++ b/apps/plugins/mpegplayer/video_thread.c
@@ -955,7 +955,7 @@ static void video_thread(void)
955 else 955 else
956 { 956 {
957 /* Just a little left - spin and be accurate */ 957 /* Just a little left - spin and be accurate */
958 rb->priority_yield(); 958 rb->yield();
959 if (str_have_msg(&video_str)) 959 if (str_have_msg(&video_str))
960 goto message_wait; 960 goto message_wait;
961 } 961 }
@@ -998,13 +998,15 @@ bool video_thread_init(void)
998 998
999 video_str.hdr.q = &video_str_queue; 999 video_str.hdr.q = &video_str_queue;
1000 rb->queue_init(video_str.hdr.q, false); 1000 rb->queue_init(video_str.hdr.q, false);
1001 rb->queue_enable_queue_send(video_str.hdr.q, &video_str_queue_send);
1002 1001
1003 /* We put the video thread on another processor for multi-core targets. */ 1002 /* We put the video thread on another processor for multi-core targets. */
1004 video_str.thread = rb->create_thread( 1003 video_str.thread = rb->create_thread(
1005 video_thread, video_stack, VIDEO_STACKSIZE, 0, 1004 video_thread, video_stack, VIDEO_STACKSIZE, 0,
1006 "mpgvideo" IF_PRIO(,PRIORITY_PLAYBACK) IF_COP(, COP)); 1005 "mpgvideo" IF_PRIO(,PRIORITY_PLAYBACK) IF_COP(, COP));
1007 1006
1007 rb->queue_enable_queue_send(video_str.hdr.q, &video_str_queue_send,
1008 video_str.thread);
1009
1008 if (video_str.thread == NULL) 1010 if (video_str.thread == NULL)
1009 return false; 1011 return false;
1010 1012