From fadbf0a6f72540b025987a2b3df3f9edd4e3e411 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Tue, 20 Nov 2007 03:44:25 +0000 Subject: Make threads responsible for explicit cancellation of their own boosted status. Sleeping and timeouts will no longer cancel it. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15709 a1c6a512-1295-4272-9138-f99709370657 --- apps/playback.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'apps/playback.c') diff --git a/apps/playback.c b/apps/playback.c index 5b9f568..782c613 100644 --- a/apps/playback.c +++ b/apps/playback.c @@ -848,6 +848,7 @@ static bool codec_pcmbuf_insert_callback( while ((dest = pcmbuf_request_buffer(&out_count)) == NULL) { + cancel_cpu_boost(); sleep(1); if (ci.seek_time || ci.new_track || ci.stop_codec) return true; @@ -1277,6 +1278,7 @@ static void codec_thread(void) while (1) { status = 0; + cancel_cpu_boost(); queue_wait(&codec_queue, &ev); switch (ev.id) { @@ -2388,6 +2390,7 @@ static void audio_thread(void) while (1) { + cancel_cpu_boost(); queue_wait_w_tmo(&audio_queue, &ev, HZ/2); switch (ev.id) { -- cgit v1.1