From 4117c64917db87e2d6b47a0efe62cc1f13d6cafb Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Thu, 13 Sep 2007 21:40:56 +0000 Subject: UISIMULATOR: Trying to make it snappy for everyone. Remove forced thread yield in switch_thread which starves threads that call it alot especially on fast 64-bit machines (which could yield _alot_ of time away). I suspect that was a way to get I/O to run better before having an I/O thread...and it did help before that addition. No longer needed it seems and the OS seems to handle scheduling without hints just fine. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14685 a1c6a512-1295-4272-9138-f99709370657 --- uisimulator/sdl/thread-sdl.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'uisimulator/sdl') 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; -- cgit v1.2.3