From 6d85de341928aef8178465c60122f3cbe76f5dd6 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Fri, 18 Feb 2011 22:46:01 +0000 Subject: Implement cooperative threads on hosted platforms using C code. This replaces SDL threads with real cooperative threads, which are less cpu intensive and allow priority scheduling. The backend for context switching is dependant on the host (sigaltstack/longjmp on Unix, Fibers on Windows). configure has options to force or disallow SDL threads. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29327 a1c6a512-1295-4272-9138-f99709370657 --- uisimulator/common/io.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'uisimulator') diff --git a/uisimulator/common/io.c b/uisimulator/common/io.c index f77180dc21..0d680e0e8a 100644 --- a/uisimulator/common/io.c +++ b/uisimulator/common/io.c @@ -46,9 +46,12 @@ #endif #include -#include -#include +#ifdef HAVE_SDL_THREADS #include "thread-sdl.h" +#else +#define sim_thread_unlock() NULL +#define sim_thread_lock(a) +#endif #include "thread.h" #include "kernel.h" #include "debug.h" -- cgit v1.2.3