Commit graph

7 commits

Author SHA1 Message Date
Thomas Martitz
d8f6c75ab9 Hopefully get shutdown/exit handling on SDL/maemo right.
Make shutdown_hw() not return as it's supposed to, ensure sim_do_exit() is called from main thread and move sim_kernel_shutdown() into it to simplify things.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29455 a1c6a512-1295-4272-9138-f99709370657
2011-02-28 03:24:48 +00:00
Thomas Martitz
6d85de3419 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
2011-02-18 22:46:01 +00:00
Michael Sevakis
7f31e38ac1 interrupt_level should've been volatile as well when I changed this file. Obtuseness FTW.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28924 a1c6a512-1295-4272-9138-f99709370657
2010-12-29 14:10:00 +00:00
Michael Sevakis
4d39c9fb2e UISimulator: Need a 'while' not an 'if' in sim_enter_irq_handler. Add comments explaining things.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28916 a1c6a512-1295-4272-9138-f99709370657
2010-12-28 11:33:55 +00:00
Thomas Martitz
6cbacb1b3e Return interval in the SDL timer callback as it should happen in periodic timers.
If the SDL timer resolution was higher than 10ms it would have restarted the timer after 1ms, but it made no difference.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28912 a1c6a512-1295-4272-9138-f99709370657
2010-12-27 12:49:28 +00:00
Thomas Martitz
87409a2619 Move memset6() declaration to string-extra.h, kills a warning compiling for android since it ships a memory.h.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27789 a1c6a512-1295-4272-9138-f99709370657
2010-08-12 13:55:01 +00:00
Thomas Martitz
3d0cee8abb - Move uisimulator/sdl/*.[ch] into the target tree, under firmware/target/hosted/sdl, uisdl.c is split up across button-sdl.c and system-sdl.c.
- Refactor the program startup. main() is now in main.c like on target, and the implicit application thread will now act as our main thread (previously a separate one was created for this in thread initialization).

This is part of Rockbox as an application and is the first step to make an application port from the uisimulator. In a further step the sim bits from the sdl build will be separated out.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26065 a1c6a512-1295-4272-9138-f99709370657
2010-05-15 21:02:47 +00:00
Renamed from uisimulator/sdl/kernel-sdl.c (Browse further)