diff options
| author | Michael Sevakis <jethead71@rockbox.org> | 2007-09-13 21:40:56 +0000 |
|---|---|---|
| committer | Michael Sevakis <jethead71@rockbox.org> | 2007-09-13 21:40:56 +0000 |
| commit | 4117c64917db87e2d6b47a0efe62cc1f13d6cafb (patch) | |
| tree | 68d86915a68f244c30a043e8759f03d328a2e180 | |
| parent | 5128080328b74f78ff8e03a4fc4b3d0f4b305601 (diff) | |
| download | rockbox-4117c64917db87e2d6b47a0efe62cc1f13d6cafb.zip rockbox-4117c64917db87e2d6b47a0efe62cc1f13d6cafb.tar.gz rockbox-4117c64917db87e2d6b47a0efe62cc1f13d6cafb.tar.bz2 rockbox-4117c64917db87e2d6b47a0efe62cc1f13d6cafb.tar.xz | |
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
| -rw-r--r-- | uisimulator/sdl/thread-sdl.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/uisimulator/sdl/thread-sdl.c b/uisimulator/sdl/thread-sdl.c index ea8bb39..0bd7d25 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; |