From 8cfbd3604fac14f629244e521ad24ffa9938c790 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Wed, 10 Dec 2008 08:57:10 +0000 Subject: Use cookies for thread identification instead of pointers directly which gives a buffer against wrongly identifying a thread when the slot is recycled (which has been nagging me for awhile). A slot gets 255 uses before it repeats. Everything gets incompatible so a full update is required. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19377 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/mpegplayer/audio_thread.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'apps/plugins/mpegplayer/audio_thread.c') diff --git a/apps/plugins/mpegplayer/audio_thread.c b/apps/plugins/mpegplayer/audio_thread.c index 45226575c9..2fb46efd56 100644 --- a/apps/plugins/mpegplayer/audio_thread.c +++ b/apps/plugins/mpegplayer/audio_thread.c @@ -732,7 +732,7 @@ bool audio_thread_init(void) rb->queue_enable_queue_send(audio_str.hdr.q, &audio_str_queue_send, audio_str.thread); - if (audio_str.thread == NULL) + if (audio_str.thread == 0) return false; /* Wait for thread to initialize */ @@ -744,11 +744,11 @@ bool audio_thread_init(void) /* Stops the audio thread */ void audio_thread_exit(void) { - if (audio_str.thread != NULL) + if (audio_str.thread != 0) { str_post_msg(&audio_str, STREAM_QUIT, 0); rb->thread_wait(audio_str.thread); - audio_str.thread = NULL; + audio_str.thread = 0; } #ifndef SIMULATOR -- cgit v1.2.3