summaryrefslogtreecommitdiff
path: root/apps/voice_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/voice_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/voice_thread.c')
-rw-r--r--apps/voice_thread.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/voice_thread.c b/apps/voice_thread.c
index 7bf52d4d0d..6e70f43cc5 100644
--- a/apps/voice_thread.c
+++ b/apps/voice_thread.c
@@ -424,12 +424,14 @@ void voice_thread_init(void)
424{ 424{
425 logf("Starting voice thread"); 425 logf("Starting voice thread");
426 queue_init(&voice_queue, false); 426 queue_init(&voice_queue, false);
427 queue_enable_queue_send(&voice_queue, &voice_queue_sender_list);
428 mutex_init(&voice_mutex); 427 mutex_init(&voice_mutex);
429 event_init(&voice_event, STATE_SIGNALED | EVENT_MANUAL); 428 event_init(&voice_event, STATE_SIGNALED | EVENT_MANUAL);
430 voice_thread_p = create_thread(voice_thread, voice_stack, 429 voice_thread_p = create_thread(voice_thread, voice_stack,
431 sizeof(voice_stack), CREATE_THREAD_FROZEN, 430 sizeof(voice_stack), CREATE_THREAD_FROZEN,
432 voice_thread_name IF_PRIO(, PRIORITY_PLAYBACK) IF_COP(, CPU)); 431 voice_thread_name IF_PRIO(, PRIORITY_PLAYBACK) IF_COP(, CPU));
432
433 queue_enable_queue_send(&voice_queue, &voice_queue_sender_list,
434 voice_thread_p);
433} /* voice_thread_init */ 435} /* voice_thread_init */
434 436
435/* Unfreeze the voice thread */ 437/* Unfreeze the voice thread */