summaryrefslogtreecommitdiffstats
path: root/uisimulator
diff options
context:
space:
mode:
authorDaniel Ankers <dan@weirdo.org.uk>2006-09-03 20:21:21 +0000
committerDaniel Ankers <dan@weirdo.org.uk>2006-09-03 20:21:21 +0000
commit9bb312823528b0ee3203adc1856e62db59fc5d06 (patch)
treede3bbf657c25e5814ff909dc1e481d66cf277d9b /uisimulator
parent548e4484c94a9aa47455afca54f1250cc997fe26 (diff)
downloadrockbox-9bb312823528b0ee3203adc1856e62db59fc5d06.tar.gz
rockbox-9bb312823528b0ee3203adc1856e62db59fc5d06.tar.bz2
rockbox-9bb312823528b0ee3203adc1856e62db59fc5d06.zip
Fix simulation of threads across multiple cores
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10875 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator')
-rw-r--r--uisimulator/sdl/thread-sdl.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/uisimulator/sdl/thread-sdl.c b/uisimulator/sdl/thread-sdl.c
index 0090c76ab2..0ddf37a5a0 100644
--- a/uisimulator/sdl/thread-sdl.c
+++ b/uisimulator/sdl/thread-sdl.c
@@ -33,7 +33,7 @@ SDL_mutex *m;
void yield(void)
{
static int counter = 0;
-
+
SDL_mutexV(m);
if (counter++ >= 50)
{
@@ -58,6 +58,12 @@ int runthread(void *data)
return 0;
}
+int create_thread_on_core(void (*core)(void), void (*fp)(void), void* sp, int stk_size)
+{
+ (void)core;
+ return create_thread(fp, sp, stk_size);
+}
+
int create_thread(void (*fp)(void), void* sp, int stk_size)
{
/** Avoid compiler warnings */