summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Everton <dan@iocaine.org>2006-02-12 12:47:20 +0000
committerDan Everton <dan@iocaine.org>2006-02-12 12:47:20 +0000
commitd66c0e5d091cbc16f7a52a9d9ead01b481c70657 (patch)
tree228e39060ab2517e3d977fd7ea7cd4b18a1d9829
parentb57dc4cc48ed1e34cb5e01853e349812ff269b3e (diff)
downloadrockbox-d66c0e5d091cbc16f7a52a9d9ead01b481c70657.tar.gz
rockbox-d66c0e5d091cbc16f7a52a9d9ead01b481c70657.zip
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
-rw-r--r--uisimulator/sdl/thread-sdl.c4
1 files changed, 3 insertions, 1 deletions
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)
46 46
47int runthread(void *data) 47int runthread(void *data)
48{ 48{
49 SDL_mutexV(m); 49 SDL_mutexP(m);
50 ((void(*)())data) (); 50 ((void(*)())data) ();
51 SDL_mutexV(m); 51 SDL_mutexV(m);
52 return 0; 52 return 0;
@@ -64,6 +64,8 @@ int create_thread(void (*fp)(void), void* sp, int stk_size)
64 64
65 threads[threadCount++] = SDL_CreateThread(runthread, fp); 65 threads[threadCount++] = SDL_CreateThread(runthread, fp);
66 66
67 yield();
68
67 return 0; 69 return 0;
68} 70}
69 71