Thank you to anyone who has already donated - your generous donations helped make three months of treatment possible.

My brother Nate continues to fight stage IV Hodgkin's lymphoma. He's just 31, with a wife and baby girl. They have no active income (since he's been unable to return to work), no insurance, and cannot afford the treatment he needs. Nate and his family need your help. Please consider a donation, every dollar helps. Thanks.


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
commit 4fe5d19888549978fac739e61b08ae7b4e5adfa0
Author: Thomas Jarosch <tomj@simonv.com>
Date:   Mon Feb 28 01:13:03 2011 +0100

    Fix hang in sim/SDL app build if sigaltstack is used

    This affects trunk as it tries to use sigaltstack by default.

    We shouldn't call sim_kernel_shutdown() from the SDL event thread, other
    rockbox threads still might need the IRQ mutex which is destroyed in there.

    Implemented workaround:
    - Don't free the mutex in sim_kernel_shutdown()
      if sigaltstack is active. Will be cleaned up by the OS later on.

    Proper solution:
    - Find a better place in the main rockbox code
      to call sim_kernel_shutdown(), triggered by
      an event from the SDL event thread.

      The proper place needs discussion.

diff --git a/firmware/target/hosted/sdl/kernel-sdl.c b/firmware/target/hosted/sdl/kernel-sdl.c
index 4fb1aed..443c57b 100644
--- a/firmware/target/hosted/sdl/kernel-sdl.c
+++ b/firmware/target/hosted/sdl/kernel-sdl.c
@@ -149,10 +149,11 @@ void sim_kernel_shutdown(void)
 #ifndef HAVE_SDL_THREADS
     do_exit = true;
     SDL_CondSignal(wfi_cond);
-#endif
+#else
     disable_irq(); 
     SDL_DestroyMutex(sim_irq_mtx);
     SDL_DestroyCond(sim_thread_cond); 
+#endif
 }

 Uint32 tick_timer(Uint32 interval, void *param)