rockbox/firmware/target/hosted/sdl
Thomas Jarosch c55be3b83a maemo port: Fix startup crash exposed by audio thread refactoring
The refactoring of the audio thread in this commit
-----------------------------------------------
commit 5857c44017
Author: Michael Sevakis <jethead71@rockbox.org>
Date:   Fri May 31 02:41:02 2013 -0400

    Refactor audio thread to run both recording and playback.
-----------------------------------------------

moved pcm_init() next to dsp_init() in apps/main.c:init().
Before that pcm_init() was called by audio_init().

Unfortunately the maemo init code didn't properly
wait until the maemo thread was fully initialized,
leading to dangling pointers when the code called
by pcm_init() tried to access maemo's variables.

Fix it by refactoring the "very fast shutdown" semaphore
to wait until maemo is initialized in any case.

This should also fix very rare rockbox crashes
on startup that I got once a year or so.
The new code has been tested by a script that
starts and kills rockbox after one second.

Change-Id: I464efce5f2b71ca869c72a5bc578555b8022e459
2014-12-20 02:23:15 +01:00
..
app
button-sdl.c
button-sdl.h
buttonmap.h
filesystem-sdl.c
filesystem-sdl.h
kernel-sdl.c
key_to_touch-sdl.c
lcd-bitmap.c
lcd-bitmap.h
lcd-charcells.c
lcd-charcells.h
lcd-remote-bitmap.c
lcd-remote-bitmap.h
lcd-sdl.c
lcd-sdl.h
load_code-sdl.c
pcm-sdl.c
sim-ui-defines.h
system-sdl.c
system-sdl.h
system-sim.h
system-target.h
thread-sdl.c
thread-sdl.h
timer-sdl.c