From d66c0e5d091cbc16f7a52a9d9ead01b481c70657 Mon Sep 17 00:00:00 2001 From: Dan Everton Date: Sun, 12 Feb 2006 12:47:20 +0000 Subject: Correct mutex locking order in runthread. Doesn't seem to fix anything though. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8664 a1c6a512-1295-4272-9138-f99709370657 --- uisimulator/sdl/thread-sdl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'uisimulator/sdl/thread-sdl.c') diff --git a/uisimulator/sdl/thread-sdl.c b/uisimulator/sdl/thread-sdl.c index 41a60c9bc5..587a5cc868 100644 --- a/uisimulator/sdl/thread-sdl.c +++ b/uisimulator/sdl/thread-sdl.c @@ -46,7 +46,7 @@ void sim_sleep(int ticks) int runthread(void *data) { - SDL_mutexV(m); + SDL_mutexP(m); ((void(*)())data) (); SDL_mutexV(m); return 0; @@ -64,6 +64,8 @@ int create_thread(void (*fp)(void), void* sp, int stk_size) threads[threadCount++] = SDL_CreateThread(runthread, fp); + yield(); + return 0; } -- cgit v1.2.3