summaryrefslogtreecommitdiff
path: root/uisimulator
diff options
context:
space:
mode:
Diffstat (limited to 'uisimulator')
-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