CoolFace
Datasetpublic

hschumann2/TempleOS-Source-Code

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes838downloads
MultiCore.txt24 linesDownload Raw Back to Doc
1 2TempleOS does master-slave multicore instead of SMP.  Core0 is the master.  The3master core's applications explicitly assign computational jobs to other cores4and the TempleOS scheduler does not move tasks between cores.5 6There are multicore safe locks for file access and heap allocations, however, so7TempleOS is symmetrical in some sense.  See ::/Demo/MultiCore/LoadTest.HC.8 9Only tasks on Core0 can have windows, but other cores can help render them.10 11Each core has an executive Seth Task which is the father of all tasks on that12core.  Adam is the Seth Task on Core0.13 14You give a job to a Seth Task with JobQue() and get the result with JobResGet().15 You spawn a task on any core with Spawn().16 17Note: You must use the LOCK asm prefix when changing shared structures in a18multicore environment.  The LBts(), LBtr() and LBtc() insts have LOCK prefixes.19The compiler has a lock{} feature but it doesn't work well.  See20::/Demo/MultiCore/Lock.HC.21 22See ::/Demo/Graphics/Transform.HC.23See ::/Kernel/MultiProc.HC.24