summaryrefslogtreecommitdiff
path: root/uisimulator/sdl/thread-sdl.c (follow)
Commit message (Collapse)AuthorAge
* - Move uisimulator/sdl/*.[ch] into the target tree, under ↵Thomas Martitz2010-05-15
| | | | | | | | | | 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
* Use API call instead of accessing a global variable for receiving the ↵Thomas Martitz2010-04-16
| | | | | | current thread. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25657 a1c6a512-1295-4272-9138-f99709370657
* threads_exit should be volatile being polled in a loop on a sim thread and ↵Michael Sevakis2009-01-08
| | | | | | be written by the GUI thread. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19721 a1c6a512-1295-4272-9138-f99709370657
* Allow sims to shut down normally from panic code.Michael Sevakis2009-01-08
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19718 a1c6a512-1295-4272-9138-f99709370657
* Use cookies for thread identification instead of pointers directly which ↵Michael Sevakis2008-12-10
| | | | | | gives a buffer against wrongly identifying a thread when the slot is recycled (which has been nagging me for awhile). A slot gets 255 uses before it repeats. Everything gets incompatible so a full update is required. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19377 a1c6a512-1295-4272-9138-f99709370657
* Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg2008-06-28
| | | | | | | | | later. We still need to hunt down snippets used that are not. 1324 modified files... http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
* Do core interrupt masking in a less general fashion and save some ↵Michael Sevakis2008-03-26
| | | | | | instructions to decrease size and speed things up a little bit. Small fix to a few places where interrupts would get enabled again where they shouldn't have been (context switching calls when disabled). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16811 a1c6a512-1295-4272-9138-f99709370657
* Add a complete priority inheritance implementation to the scheduler (all ↵Michael Sevakis2008-03-25
| | | | | | mutex ownership and queue_send calls are inheritable). Priorities are differential so that dispatch depends on the runnable range of priorities. Codec priority can therefore be raised in small steps (pcmbuf updated to enable). Simplify the kernel functions to ease implementation and use the same kernel.c for both sim and target (I'm tired of maintaining two ;_). 1) Not sure if a minor audio break at first buffering issue will exist on large-sector disks (the main mutex speed issue was genuinely resolved earlier). At this point it's best dealt with at the buffering level. It seems a larger filechunk could be used again. 2) Perhaps 64-bit sims will have some minor issues (finicky) but a backroll of the code of concern there is a 5-minute job. All kernel objects become incompatible so a full rebuild and update is needed. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16791 a1c6a512-1295-4272-9138-f99709370657
* Do some simplification in switch_thread regarding interrupt enabling which ↵Michael Sevakis2008-01-19
| | | | | | simplifies kernel objects as well. Simply doing unconditional disable/enable should be fine in the firmware. Not sure about the case in the bootloader for all targets and so will evaluate but that should be fine too if everything is masked. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16107 a1c6a512-1295-4272-9138-f99709370657
* Simplify the uisimulator I/O routine and let the rockbox thread calling the ↵Michael Sevakis2007-12-03
| | | | | | functions be the background thread. Should speed things up too and lose none of the advantanges of background I/O. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15870 a1c6a512-1295-4272-9138-f99709370657
* Implement as genuine a set_irq_level function for the sim as possible. The ↵Michael Sevakis2007-10-26
| | | | | | yield added earlier is still nescessary since other threads won't run anyway while viewing the database screen on either sim or target. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15321 a1c6a512-1295-4272-9138-f99709370657
* Finally full multicore support for PortalPlayer 502x targets with an eye ↵Michael Sevakis2007-10-16
| | | | | | towards the possibility of other types. All SVN targets the low-lag code to speed up blocking operations. Most files are modified here simple due to a name change to actually support a real event object and a param change to create_thread. Add some use of new features but just sit on things for a bit and leave full integration for later. Work will continue on to address size on sensitive targets and simplify things if possible. Any PP target having problems with SWP can easily be changed to sw corelocks with one #define change in config.h though only PP5020 has shown an issue and seems to work without any difficulties. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15134 a1c6a512-1295-4272-9138-f99709370657
* UISIMULATOR: Trying to make it snappy for everyone. Remove forced thread ↵Michael Sevakis2007-09-13
| | | | | | 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
* UISIMULATOR: Do a graceful shutdown of all threads and avoid (mostly lockup) ↵Michael Sevakis2007-09-10
| | | | | | problems caused by not worrying about states. Have rockbox objects initialized only by rockbox threads save for the main 'gui' thread which is a needed exception. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14660 a1c6a512-1295-4272-9138-f99709370657
* More Simulator tweaking. Back to the counter but with 0 delay. Forget the ↵Michael Sevakis2007-09-09
| | | | | | semaphore; it makes for too much kernel thread yielding. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14649 a1c6a512-1295-4272-9138-f99709370657
* UISIMULATOR: Give the host OS some needed context switching hints (which ↵Michael Sevakis2007-09-09
| | | | | | _is_ supposed to work on Linux - but I can't tell on VMWare - and does on Windows). I guess I'll know for sure soon. Give sleep() even more genuine behavior. Add some button driver sync with the rockbox threads that should have been there for some time - this is basically interrupt-like processing as any thread not in the kernel pool should be considered. Make the screendump work again by posting the request. Perhaps help out shutting down for some users but not in the way I'd prefer - to think about. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14646 a1c6a512-1295-4272-9138-f99709370657
* Make sleep(0) in the sim behave more like on target.Jens Arnold2007-09-08
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14645 a1c6a512-1295-4272-9138-f99709370657
* Sim I/O and threading that runs more like on target. Tweakable if any ↵Michael Sevakis2007-09-08
| | | | | | genuine slowness imitation is required for any one of them. One point of concern is the sim shutdown on an OS other than Linux just because terminating threads in a manner other than having the do it themselves is kind of dirty IMHO. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14639 a1c6a512-1295-4272-9138-f99709370657
* Fix sim errors. Every extra byte feels guilt-free. ;)Michael Sevakis2007-06-25
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13717 a1c6a512-1295-4272-9138-f99709370657
* Implement remove_thread for SDL simulatorSteve Bavin2007-03-30
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12971 a1c6a512-1295-4272-9138-f99709370657
* Make the sim create_thread() function slightly closer to the real thing. ↵Dave Chapman2007-03-24
| | | | | | #include "thread.h" in thread-sdl.c to ensure function prototypes are consistent. This now allows mpegplayer to run in the sim. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12901 a1c6a512-1295-4272-9138-f99709370657
* Dual core support for PP502x players (iPod G4 and later, iriver h10, Sansa - ↵Daniel Ankers2007-03-04
| | | | | | iPod G3 will be coming soon.) This allows threads to be run on either core provided that all communications between the cores is done using uncached memory. There should be no significant change in battery life from doing this. Documentation (on the RockboxKernel wiki page) will follow shortly. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12601 a1c6a512-1295-4272-9138-f99709370657
* Oops - fix warnings and add a simulator version of remove_thread_on_core()Daniel Ankers2006-09-03
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10876 a1c6a512-1295-4272-9138-f99709370657
* Fix simulation of threads across multiple coresDaniel Ankers2006-09-03
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10875 a1c6a512-1295-4272-9138-f99709370657
* Adjust the counter even higher so it should work quite stable now.Miika Pekkarinen2006-07-31
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10385 a1c6a512-1295-4272-9138-f99709370657
* Prevent the simulator SDL audio skipping under Linux.Miika Pekkarinen2006-07-31
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10383 a1c6a512-1295-4272-9138-f99709370657
* Correct mutex locking order in runthread. Doesn't seem to fix anything though.Dan Everton2006-02-12
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8664 a1c6a512-1295-4272-9138-f99709370657
* Patch #1417462 by Dan Everton - Improved SDL simulatorLinus Nielsen Feltzing2006-02-03
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8546 a1c6a512-1295-4272-9138-f99709370657