forked from len0rd/rockbox
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
This commit is contained in:
parent
40ff47c7ee
commit
8cfbd3604f
32 changed files with 329 additions and 234 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue