summaryrefslogtreecommitdiff
path: root/uisimulator/sdl/kernel.c (follow)
Commit message (Collapse)AuthorAge
* 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
* Finally, out goes struct spinlock for anything but mutiprocessor targets ↵Michael Sevakis2008-01-18
| | | | | | where it becomes a reenterable corelock. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16105 a1c6a512-1295-4272-9138-f99709370657
* Improve the fake interrupt stuff on the sim a bit.Michael Sevakis2007-10-28
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15349 a1c6a512-1295-4272-9138-f99709370657
* Add queue_peek to the kernel (written by Mike Sevakis), and use it to ↵Nicolas Pennequin2007-10-27
| | | | | | improve upon my previous commit. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15336 a1c6a512-1295-4272-9138-f99709370657
* Correct some commenting left from an earlier set_irq_level version.Michael Sevakis2007-10-26
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15323 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
* Fix a warning (no newline at end of file).Michael Sevakis2007-10-16
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15136 a1c6a512-1295-4272-9138-f99709370657
* Fix the redMichael Sevakis2007-10-16
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15135 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
* Enable auto reply for queue messages sent with queue_send. It's only ↵Michael Sevakis2007-09-30
| | | | | | nescessary to use queue_reply to return a value other than zero or to return a result before waiting on the queue again. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14923 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
* Fix some warnings in sim kernel.Michael Sevakis2007-09-08
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14640 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 red simulator builds. queue_broadcast() was missing...Jens Arnold2007-08-12
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14293 a1c6a512-1295-4272-9138-f99709370657
* Slightly less hacky sim queue_send(), fixes simulator crashes FS#7051 and ↵Steve Bavin2007-08-01
| | | | | | FS#7245. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14113 a1c6a512-1295-4272-9138-f99709370657
* Simplification, queue pointers don't wrap (except at INT_MAX, but the ↵Jens Arnold2007-04-14
| | | | | | calculation is still correct in this case). Implemented queue_count() for the simulator. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13154 a1c6a512-1295-4272-9138-f99709370657
* Perform the obligatory fix-the-sims dance.Michael Sevakis2007-03-21
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12882 a1c6a512-1295-4272-9138-f99709370657
* Put an end to priority inversion in the ata driver. Gave up trying to have ↵Michael Sevakis2007-03-09
| | | | | | fully atomic dual use mutexes so just replaced the ata driver locking with spins. Maybe I'll have better luck later. Things should run smoothly with database updates and such happening in the background. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12688 a1c6a512-1295-4272-9138-f99709370657
* Convert queues to use intptr_t for event data and return values as most of ↵Michael Sevakis2006-12-19
| | | | | | the time pointer are not passed and it should make some things a bit cleaner. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11818 a1c6a512-1295-4272-9138-f99709370657
* Add queue_send synchronous message sending. Right now only for SWCODEC. ↵Michael Sevakis2006-12-16
| | | | | | Actual usage to be added to playback and recording shortly in upcoming commits. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11776 a1c6a512-1295-4272-9138-f99709370657
* Oops, sim was missing a queue functionSteve Bavin2006-11-03
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11421 a1c6a512-1295-4272-9138-f99709370657
* New scheduler, with priorities for swcodec platforms. Frequent taskMiika Pekkarinen2006-09-16
| | | | | | | | | | switching should be more efficient and tasks are stored in linked lists to eliminate unnecessary task switching to improve performance. Audio should no longer skip on swcodec targets caused by too CPU hungry UI thread or background threads. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10958 a1c6a512-1295-4272-9138-f99709370657
* Patch 5107 from Steve Bavin, enable locking on sdl sim, now mutexes actually ↵Brandon Low2006-04-12
| | | | | | MUT EX on the SDL sim git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9638 a1c6a512-1295-4272-9138-f99709370657
* Use correct sleep function in simulator queue wait.Dan Everton2006-03-29
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9343 a1c6a512-1295-4272-9138-f99709370657
* Allow building simulators on systems where errno is thread-local by using ↵Jens Arnold2006-02-28
| | | | | | the system's implementation of errno.h for simulator builds. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8871 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
* New kernel function, queue_delete(struct event_queue *q)Linus Nielsen Feltzing2006-01-23
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8424 a1c6a512-1295-4272-9138-f99709370657
* SDL simulator brought by Nathan Hand and Nick Lanham. This is added as a thirdDaniel Stenberg2006-01-09
simulator with the hope that once it works fine, we can remove the other two and only have one unified simulator. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8312 a1c6a512-1295-4272-9138-f99709370657