Commit graph

149 commits

Author SHA1 Message Date
Michael Sevakis
84f5c5c3e3 Take out some NOCACHEBSS_ATTR's that were accidentally left. Put some threading code in IRAM that should be there on PP502x.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15155 a1c6a512-1295-4272-9138-f99709370657
2007-10-16 22:00:51 +00:00
Michael Sevakis
a9b2fb5ee3 Finally full multicore support for PortalPlayer 502x targets with an eye 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
2007-10-16 01:25:17 +00:00
Michael Sevakis
18e87ff1c0 Stabilize PP5020 targets - tested on H10 5/20GB and iPod Color. Use no interrupts on COP but pulse it through the control interface. Don't mess with LCD clocking during clock changes. Give a reset register a name (DEV_OFF_MASK).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14998 a1c6a512-1295-4272-9138-f99709370657
2007-10-05 23:24:46 +00:00
Catalin Patulea
ea47ee64f0 Watch out for uninitialized threads[] in init_threads() which can cause big headaches later in unrelated places.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14934 a1c6a512-1295-4272-9138-f99709370657
2007-10-01 04:13:17 +00:00
Michael Sevakis
da55251a35 Compile Portal Player bootloaders as single core. Cleanup the startup code for bootloaders. Remove cop stack entirely and keep IRAM use down on all relevant targets - just use the 128-byte idle stack. Use the inline asm version of current_core for pp5002 as well.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14898 a1c6a512-1295-4272-9138-f99709370657
2007-09-29 06:17:33 +00:00
Michael Sevakis
869de4d10a Oops. Can't wait for COP init in the bootloader because it is kept asleep until the firmware is ready to be run.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14888 a1c6a512-1295-4272-9138-f99709370657
2007-09-28 17:24:29 +00:00
Michael Sevakis
a13a1d5492 Anti-red: No need for COP initialization in the bootloaders nor idle stacks.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14880 a1c6a512-1295-4272-9138-f99709370657
2007-09-28 10:54:27 +00:00
Michael Sevakis
7914e90738 Commit a subset of the dual core changes that have to do with cache handling, stacks, firmware startup and thread startup. Tested on e200, H10-20GB, iPod Color and 5.5G. Thread function return implemented for all targets. Some changes to plugins to follow shortly.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14879 a1c6a512-1295-4272-9138-f99709370657
2007-09-28 10:20:02 +00:00
Karl Kurbjun
7b97fe21c0 Beginning of an M:Robe 500i port. Currently only in the bootloader stage. Needs another piece of code to start the boot process - will be in the wiki.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14763 a1c6a512-1295-4272-9138-f99709370657
2007-09-20 04:46:41 +00:00
Michael Sevakis
1ea6daf01e Perform writeback before starting thread on another core or stack munging may not be coherent.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14194 a1c6a512-1295-4272-9138-f99709370657
2007-08-05 12:32:34 +00:00
Michael Sevakis
a690ebb1d1 Trim a little bulk off the scheduler for dual core. Shouldn't change bin size on single except for a small function call avoidance.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14075 a1c6a512-1295-4272-9138-f99709370657
2007-07-30 16:44:36 +00:00
Magnus Holmgren
57aa67468a Apply FS#7183. Also change to use documented ways to avoid inlining of functions.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13564 a1c6a512-1295-4272-9138-f99709370657
2007-06-05 19:10:54 +00:00
Michael Sevakis
bfb281ff63 Messages queues must be guarded on both ends or else it's a race between detecting a message present and missing a wakeup on thread about to wait. Keeping IRQs from interacting with the scheduler would be preferable but this should do at the moment. Add more detailed panic info regarding blocking violations so we know who. Make panicf function well enough on Gigabeat and PortalPlayer targets. Move the core sleep instructions into a CPU-specific inline to keep thing organized.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13374 a1c6a512-1295-4272-9138-f99709370657
2007-05-12 05:20:04 +00:00
Michael Sevakis
bd6cb34f48 Hrmph. Forgot the other instance of cache hacking.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13146 a1c6a512-1295-4272-9138-f99709370657
2007-04-13 21:25:07 +00:00
Michael Sevakis
d95c39072a Portal Player: Add invalidate_icache and flush_icache. Flush the cache on the core for newborn threads. In doing so, move more ARM stuff to the target tree and organize it to make a clean job of it. If anything isn't appropriate for some particular device give a hollar or even just fix it by some added #ifdefing. I was informed that the PP targets are register compatible so I'm going off that advice. The Sansa likes it though.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13144 a1c6a512-1295-4272-9138-f99709370657
2007-04-13 20:55:48 +00:00
Miika Pekkarinen
4954bdf6d3 Accidentally enabled core locking mechanism. Now disabled again because it still causes problems on some players.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12989 a1c6a512-1295-4272-9138-f99709370657
2007-04-01 11:47:58 +00:00
Miika Pekkarinen
28b061d1e3 remove_thread(NULL) contained a null pointer bug causing a crash.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12988 a1c6a512-1295-4272-9138-f99709370657
2007-04-01 11:33:33 +00:00
Miika Pekkarinen
02a4802d3e A temporary fix to crashing on some dual core targets.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12941 a1c6a512-1295-4272-9138-f99709370657
2007-03-27 20:41:10 +00:00
Miika Pekkarinen
66258a30a4 Make scheduler functions thread safe core wise. A big step towards playback running on COP (not yet possible because more protection on file system level is necessary).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12926 a1c6a512-1295-4272-9138-f99709370657
2007-03-26 16:55:17 +00:00
Michael Sevakis
165f62d0cd Fix a hole in the scheduler where collisions between waking blocked threads in mutexes with interrupts waking blocked threads in message queues can occur. Queue posts will put the threads on a separate list that is then added to the running list with IRQs disabled on the next task switch or CPU wakeup. Basically no overhead for other operations. Seems a likely cause of my occasional observation of the backlight fade causing playback threads to stop running and a recently reported blocking violation upon USB plugging. Time will tell but banging the backlight on and off frequently hasn't hiccuped again for me on H120.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12915 a1c6a512-1295-4272-9138-f99709370657
2007-03-26 03:24:36 +00:00
Michael Sevakis
dee43ece20 Put an end to priority inversion in the ata driver. Gave up trying to have 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
2007-03-09 08:03:18 +00:00
Michael Sevakis
b425de71df Fix problem with recording screen creep and bag a bigfoot. Voice clips aren't long enough now to untrigger the thread boost that was supposed to be applied to the codec thread. The voice thread was needlessly boosting the codec thread and leaving it boosted which explains the encoders' ability to flood the output buffer when everything else was stopped in its tracks. Check which thread is calling pcmbuf_under_watermark and only initiate the boost when it's the codec thread. Always return the codec thread to its usual priority in pcmbuf_play_stop.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12649 a1c6a512-1295-4272-9138-f99709370657
2007-03-06 20:32:13 +00:00
Daniel Ankers
82f9056988 Dual core support for PP502x players (iPod G4 and later, iriver h10, Sansa - 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
2007-03-04 20:06:41 +00:00
Michael Sevakis
1915c10994 Turns out I don't have a magic DAP. :( I didn't get the problem because I RoLod it. Clean the useless macros from thread_init and leave it for spawned threads.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12488 a1c6a512-1295-4272-9138-f99709370657
2007-02-26 00:04:25 +00:00
Michael Sevakis
2c9cbc12e1 Add CPU-model-specific init to newborn threads. Add default %macsr for each thread created on coldfire (EMAC_FRACTIONAL | EMAC_SATURATE).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12483 a1c6a512-1295-4272-9138-f99709370657
2007-02-25 21:43:10 +00:00
Marcoen Hirschberg
6d15996e6d add missing variable declaration
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11862 a1c6a512-1295-4272-9138-f99709370657
2006-12-29 23:42:43 +00:00
Marcoen Hirschberg
6a6c2dcb17 fix idle mode for the gigabeat
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11860 a1c6a512-1295-4272-9138-f99709370657
2006-12-29 23:29:04 +00:00
Michael Sevakis
43c15921e4 Add queue_send synchronous message sending. Right now only for SWCODEC. 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
2006-12-16 18:35:12 +00:00
Brandon Low
58e7547e89 Fix my warnings with explicit blocking on platforms w/o cpu_boost()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11511 a1c6a512-1295-4272-9138-f99709370657
2006-11-11 05:53:32 +00:00
Brandon Low
8a82892e52 Thread API enhancements.
1) block_thread -> block_thread + block_thread_w_tmo -- this call was always used in distinct ways so having one call with a conditional was ugly.
2) enhance Slasheri's scheduler controlled boost concept.  now any thread may trigger a boost which will last until that thread next sleeps.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11509 a1c6a512-1295-4272-9138-f99709370657
2006-11-11 05:33:24 +00:00
Jens Arnold
780f79e7a4 Removed the Gmini 120 and Gmini SP code. These ports are dead, unfortunately.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11504 a1c6a512-1295-4272-9138-f99709370657
2006-11-10 20:26:01 +00:00
Michael Sevakis
0f5cb94aa4 Big Patch adds primarily: Samplerate and format selection to recording for SWCODEC. Supprort for samplerates changing in playback (just goes with the recording part inseparably). Samplerates to all encoders. Encoders can be configured individually on a menu specific to the encoder in the recording menu. File creation is delayed until flush time to reduce spinups when splitting. Misc: statusbar icons for numbers are individual digits to display any number. Audio buffer was rearranged to maximize memory available to recording and properly reinitialized when trashed. ColdFire PCM stuff moved to target tree to avoid a complicated mess when adding samplerate switching. Some needed API changes and to neaten up growing gap between hardware and software codecs.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11452 a1c6a512-1295-4272-9138-f99709370657
2006-11-06 18:07:30 +00:00
Miika Pekkarinen
7058752789 Removed ugly boosting solutions from playback code and let scheduler
handle unboosting instead.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11226 a1c6a512-1295-4272-9138-f99709370657
2006-10-15 11:57:52 +00:00
Magnus Holmgren
13f3c5b2cb Fix profiling builds.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11034 a1c6a512-1295-4272-9138-f99709370657
2006-09-23 14:38:04 +00:00
Miika Pekkarinen
92ae9155a7 Don't remove the thread twice.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10960 a1c6a512-1295-4272-9138-f99709370657
2006-09-16 18:30:10 +00:00
Miika Pekkarinen
a85044bf9e New scheduler, with priorities for swcodec platforms. Frequent task
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
2006-09-16 16:18:11 +00:00
Miika Pekkarinen
3686228f9d Cleanup threads.c by moving declarations inside structs.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10853 a1c6a512-1295-4272-9138-f99709370657
2006-09-02 07:56:52 +00:00
Daniel Ankers
67ddef9aac Fix profile builds
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10734 a1c6a512-1295-4272-9138-f99709370657
2006-08-24 13:10:20 +00:00
Daniel Ankers
0aec12f3fd Threading changes in preparation for multiple core support
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10681 a1c6a512-1295-4272-9138-f99709370657
2006-08-21 17:35:35 +00:00
Marcoen Hirschberg
dd754886f5 update the gigabeat code and move to target_tree
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10535 a1c6a512-1295-4272-9138-f99709370657
2006-08-12 08:01:54 +00:00
Thom Johansen
0a952512c3 Sleep PP5020 CPU on idle.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8632 a1c6a512-1295-4272-9138-f99709370657
2006-02-08 21:30:35 +00:00
Thom Johansen
023936d5e4 ARM: r12 is scratch, so don't save it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8505 a1c6a512-1295-4272-9138-f99709370657
2006-01-31 14:48:10 +00:00
Brandon Low
05dccc3551 Profiling support, tools and documentation.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8375 a1c6a512-1295-4272-9138-f99709370657
2006-01-18 20:54:13 +00:00
Dave Chapman
d83e929f3f Work-in-progress iriver iFP-7xx port by Tomasz Malesinski
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8342 a1c6a512-1295-4272-9138-f99709370657
2006-01-12 00:35:50 +00:00
Thom Johansen
544b03cf9a Add interrupt handler for iPod. Add timer tick support. Remove temporary thread sleep solution. Remove temporary iPod current_tick solution.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8224 a1c6a512-1295-4272-9138-f99709370657
2005-12-12 13:53:22 +00:00
Thom Johansen
27cd6ca152 Make threading code for iPod compile on all ARM CPUs, comment out sleep loop until we have iPod interrupts.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8214 a1c6a512-1295-4272-9138-f99709370657
2005-12-10 19:51:56 +00:00
Thom Johansen
391f6af7ab Shave off an instruction by use of conditionals.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7896 a1c6a512-1295-4272-9138-f99709370657
2005-11-15 16:56:20 +00:00
Thom Johansen
52e91de5d3 First attempt at iPod threading.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7852 a1c6a512-1295-4272-9138-f99709370657
2005-11-13 23:47:38 +00:00
Dave Chapman
d31a32c501 iPod: Code cleanup - the bootloader now compiles with zero warnings
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7812 a1c6a512-1295-4272-9138-f99709370657
2005-11-11 17:51:35 +00:00
Dave Chapman
77372d1218 Initial commit of work-in-progress iPod port
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7781 a1c6a512-1295-4272-9138-f99709370657
2005-11-07 23:07:19 +00:00
Jens Arnold
abd9f83e92 Two new sections for IRAM usage: .irodata (selectable with the ICONST_ATTR attribute macro), allowing to put 'const' data into IRAM without causing a section type conflict, and .ibss (selectable with the IBSS_ATTR attribute macro) for uninitialised data. * Rockbox core: Adjusted the linker scripts and init code to not include the .ibss section in the binary, it is cleared instead. Saves ~500 bytes on archos and ~30KB on iriver. Codecs and plugins don't handle .ibss in a special way yet. * The init code properly handles empty sections now (except .stack, which should never be empty). * Unified the init code for SH1 and coldfire a bit.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7644 a1c6a512-1295-4272-9138-f99709370657
2005-10-19 19:35:24 +00:00
Jens Arnold
904f7fd970 Coldfire: Made the MACSR register part of the thread context to allow easier handling in the codecs.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7445 a1c6a512-1295-4272-9138-f99709370657
2005-09-01 20:06:38 +00:00
Jens Arnold
6d54d6c088 SH1: Tiny optimisation of the thread scheduler.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7406 a1c6a512-1295-4272-9138-f99709370657
2005-08-26 22:52:31 +00:00
Christian Gmeiner
c6ff1f5eb5 Added CPU_COLDFIRE define - one step closer to iAudio-port
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7186 a1c6a512-1295-4272-9138-f99709370657
2005-07-18 12:40:29 +00:00
Linus Nielsen Feltzing
a19acbdadd Removed picky warnings
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7116 a1c6a512-1295-4272-9138-f99709370657
2005-07-12 10:05:13 +00:00
Jens Arnold
a4aa508bd0 Thread scheduler reworked to be less dependent on compiler behaviour. Stack overflow check is now possible on coldfire, enabled it. Unified code as much as possible.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6665 a1c6a512-1295-4272-9138-f99709370657
2005-06-10 23:05:15 +00:00
Jens Arnold
8779802aaf Make sure the context functions are always inlined, independent of optimisation level.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6512 a1c6a512-1295-4272-9138-f99709370657
2005-05-23 19:48:55 +00:00
Jean-Philippe Bernardy
8ec05779e3 Gmini work:
* Better USB
* Better comments
* Better coding style


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6022 a1c6a512-1295-4272-9138-f99709370657
2005-02-19 17:49:58 +00:00
Jean-Philippe Bernardy
9dcb575b74 Feature conditional compilation policy
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5940 a1c6a512-1295-4272-9138-f99709370657
2005-02-13 18:55:14 +00:00
Jean-Philippe Bernardy
a1eb3d93f6 Feature conditional compilation policy
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5939 a1c6a512-1295-4272-9138-f99709370657
2005-02-13 17:07:40 +00:00
Jean-Philippe Bernardy
7e8914daf7 more int -> long
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5656 a1c6a512-1295-4272-9138-f99709370657
2005-01-24 14:41:06 +00:00
Jean-Philippe Bernardy
1265d03141 Oops, deadbeef is unsigned
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5653 a1c6a512-1295-4272-9138-f99709370657
2005-01-24 13:32:52 +00:00
Jean-Philippe Bernardy
a61d9857e8 Gmini threading
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5652 a1c6a512-1295-4272-9138-f99709370657
2005-01-24 13:18:27 +00:00
Linus Nielsen Feltzing
7b91ec6b19 Threading ported to Coldfire
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5280 a1c6a512-1295-4272-9138-f99709370657
2004-10-15 02:13:43 +00:00
Linus Nielsen Feltzing
5e54aa956f MACH, MACL and SR are no longer part of the SH1 thread context
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5268 a1c6a512-1295-4272-9138-f99709370657
2004-10-13 11:32:26 +00:00
Jens Arnold
c76c568b35 Const policed pointer arguments to functions, part 1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4995 a1c6a512-1295-4272-9138-f99709370657
2004-08-16 23:37:23 +00:00
Jens Arnold
9478cc6f8a More const policeing step 4
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4983 a1c6a512-1295-4272-9138-f99709370657
2004-08-03 19:22:56 +00:00
Jens Arnold
2b0694c694 More const policeing step 3
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4982 a1c6a512-1295-4272-9138-f99709370657
2004-08-03 05:58:46 +00:00
Linus Nielsen Feltzing
9830b164ef switch_thread() now checks the stack of the current thread instead of the next, to report stack errors sooner. I removed some TAB chars in the process.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4792 a1c6a512-1295-4272-9138-f99709370657
2004-06-22 11:32:36 +00:00
Linus Nielsen Feltzing
cac729ef82 remove_tread() -> remove_thread()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4788 a1c6a512-1295-4272-9138-f99709370657
2004-06-22 07:17:17 +00:00
Jörg Hohensohn
72e08fb838 updated remove_thread(), should cover Linus' hints
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4570 a1c6a512-1295-4272-9138-f99709370657
2004-05-01 15:36:12 +00:00
Jörg Hohensohn
7bd007a597 remove_thread() function added, for future dynamic thread creation by plugins
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4562 a1c6a512-1295-4272-9138-f99709370657
2004-04-30 20:23:04 +00:00
Björn Stenberg
72f75f36a5 Removed CPU Sleep setting. It's now permanently enabled.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3434 a1c6a512-1295-4272-9138-f99709370657
2003-03-12 15:30:59 +00:00
Björn Stenberg
c4d8d970f6 The power-saving SLEEP patch by Simon Elén.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3259 a1c6a512-1295-4272-9138-f99709370657
2003-02-14 09:44:34 +00:00
Linus Nielsen Feltzing
2f70f13a42 Moved switch_thread() and the thread context data to internal RAM
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1500 a1c6a512-1295-4272-9138-f99709370657
2002-08-01 08:14:56 +00:00
Linus Nielsen Feltzing
09153dd82a Added stack overflow check
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1358 a1c6a512-1295-4272-9138-f99709370657
2002-07-15 22:21:18 +00:00
Linus Nielsen Feltzing
9f690b8cf8 Now fills the stack with 0xdeadbeef
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1290 a1c6a512-1295-4272-9138-f99709370657
2002-07-01 21:14:20 +00:00
Björn Stenberg
3f9c7c2ab5 Demystified code
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1183 a1c6a512-1295-4272-9138-f99709370657
2002-06-25 12:04:23 +00:00
Linus Nielsen Feltzing
2a72553b24 Always clear the status register (irq mask)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1067 a1c6a512-1295-4272-9138-f99709370657
2002-06-19 06:01:06 +00:00
Linus Nielsen Feltzing
04d6d8f14f Removed a warning
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@921 a1c6a512-1295-4272-9138-f99709370657
2002-06-07 15:03:19 +00:00
Linus Nielsen Feltzing
9430a0b7d6 Added init_threads function
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@920 a1c6a512-1295-4272-9138-f99709370657
2002-06-07 14:56:10 +00:00
Linus Nielsen Feltzing
166f3298df Missing parenthesis
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@767 a1c6a512-1295-4272-9138-f99709370657
2002-05-28 15:05:56 +00:00
Linus Nielsen Feltzing
6cbe2a7301 create_thread now reserves room for PR on the stack
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@762 a1c6a512-1295-4272-9138-f99709370657
2002-05-28 13:59:24 +00:00
Linus Nielsen Feltzing
6a199bf125 Removed queue handling stuff
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@316 a1c6a512-1295-4272-9138-f99709370657
2002-04-29 14:27:46 +00:00
Linus Nielsen Feltzing
377687c423 Started work on event queues - NOT YET SAFE
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@310 a1c6a512-1295-4272-9138-f99709370657
2002-04-28 21:41:55 +00:00
Linus Nielsen Feltzing
b3aecff464 Removed ugly CR/LF stuff. Removed some comments
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@231 a1c6a512-1295-4272-9138-f99709370657
2002-04-25 13:25:54 +00:00
Linus Nielsen Feltzing
46daf2b0b3 More bugs killed. Now it may even work.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@230 a1c6a512-1295-4272-9138-f99709370657
2002-04-25 13:20:43 +00:00
Alan Korr
69d9911175 huh sorry macl and mach was misplaced in the regs part of the structure.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@229 a1c6a512-1295-4272-9138-f99709370657
2002-04-25 12:46:08 +00:00
Alan Korr
a06a3d0721 Add registers macl and mach in save and restore context functions.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@228 a1c6a512-1295-4272-9138-f99709370657
2002-04-25 12:43:55 +00:00
Alan Korr
81df66031e fix an error i did. It should be right now
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@227 a1c6a512-1295-4272-9138-f99709370657
2002-04-25 12:30:39 +00:00
Alan Korr
a6aff80b8a well there was a big bug (read more carefully the instruction descriptions) ;)
you can find why commented in the source

i'll fix it, but not test it


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@226 a1c6a512-1295-4272-9138-f99709370657
2002-04-25 12:23:37 +00:00
Linus Nielsen Feltzing
7b9581a131 Not yet working
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@220 a1c6a512-1295-4272-9138-f99709370657
2002-04-25 00:15:04 +00:00
Linus Nielsen Feltzing
603869e71e Removed some TAB characters
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@211 a1c6a512-1295-4272-9138-f99709370657
2002-04-24 12:17:19 +00:00
Linus Nielsen Feltzing
cb9d09c80a Protected the temporary register in the context switches
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@210 a1c6a512-1295-4272-9138-f99709370657
2002-04-24 11:06:41 +00:00
Björn Stenberg
8ded7ca323 The indent police strikes again!
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@181 a1c6a512-1295-4272-9138-f99709370657
2002-04-22 23:41:29 +00:00
Linus Nielsen Feltzing
c7e811bffe Changed __asm__ to asm
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@180 a1c6a512-1295-4272-9138-f99709370657
2002-04-22 22:48:07 +00:00
Linus Nielsen Feltzing
b701c89624 Even nicer inline assembly
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@179 a1c6a512-1295-4272-9138-f99709370657
2002-04-22 20:55:59 +00:00
Linus Nielsen Feltzing
34f026eb47 Adapted the context switch to SH1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@174 a1c6a512-1295-4272-9138-f99709370657
2002-04-22 19:11:17 +00:00
Daniel Stenberg
3c031c5ab9 simple collaborate multitasking scheduler donated to us by Ulf Ralberg
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@170 a1c6a512-1295-4272-9138-f99709370657
2002-04-22 12:07:34 +00:00