summaryrefslogtreecommitdiff
path: root/uisimulator/sdl
diff options
context:
space:
mode:
Diffstat (limited to 'uisimulator/sdl')
-rw-r--r--uisimulator/sdl/kernel.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/uisimulator/sdl/kernel.c b/uisimulator/sdl/kernel.c
index dddfa70066..e01fbe65b9 100644
--- a/uisimulator/sdl/kernel.c
+++ b/uisimulator/sdl/kernel.c
@@ -355,3 +355,15 @@ void mutex_unlock(struct mutex *m)
355{ 355{
356 m->locked = false; 356 m->locked = false;
357} 357}
358
359void spinlock_lock(struct mutex *m)
360{
361 while(m->locked)
362 switch_thread(true, NULL);
363 m->locked = true;
364}
365
366void spinlock_unlock(struct mutex *m)
367{
368 m->locked = false;
369}