This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#11793 - Implement threading support for PC
Attached to Project:
Rockbox
Opened by Thomas Martitz (kugel.) - Sunday, 05 December 2010, 18:20 GMT+2
Last edited by Thomas Martitz (kugel.) - Friday, 18 February 2011, 23:48 GMT+2
Opened by Thomas Martitz (kugel.) - Sunday, 05 December 2010, 18:20 GMT+2
Last edited by Thomas Martitz (kugel.) - Friday, 18 February 2011, 23:48 GMT+2
|
DetailsThis patch adds load_/store_context for PC platforms to enable us to use our own threading library.
With this patch we can finally simulate our own cooperative threading in the simulator and get rid of the somewhat hacky SDL thread implementation. For unix platforms I use make/swapcontext which is widely available; for win32 targets Fibers are used (available since win2k). The swapcontext implementation even allows us to check stack usage, although the stack usage on a PC is higher than on target so it might not be overly useful. tools/configure probes swapcontext support and falls back to the SDL thread if it's not available; win32 builds always use the Fibers. Tested with fuze simulator and mingw/wine so far. |
This task depends upon
Closed by Thomas Martitz (kugel.)
Friday, 18 February 2011, 23:48 GMT+2
Reason for closing: Accepted
Additional comments about closing: r29327, using a different mechanism on unix.
Friday, 18 February 2011, 23:48 GMT+2
Reason for closing: Accepted
Additional comments about closing: r29327, using a different mechanism on unix.