summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--uisimulator/sdl/thread-sdl.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/uisimulator/sdl/thread-sdl.c b/uisimulator/sdl/thread-sdl.c
index ea8bb39360..0bd7d2534e 100644
--- a/uisimulator/sdl/thread-sdl.c
+++ b/uisimulator/sdl/thread-sdl.c
@@ -225,17 +225,10 @@ void thread_sdl_unlock(void)
void switch_thread(bool save_context, struct thread_entry **blocked_list)
{
- static int counter = 0;
struct thread_entry *current = running;
SDL_UnlockMutex(m);
-
- if (counter++ >= 50)
- {
- SDL_Delay(0);
- counter = 0;
- }
-
+ /* Any other thread waiting already will get it first */
SDL_LockMutex(m);
running = current;