I redid all my device, heap and document locks using semaphores (flags) residing in their own cache line and made sure to use asm locked read-modify-write instructions and it seams okay doing disk access from different cores. The locks don't work if not in their own cache line, which is weird. I had been implementing the locks as a bit in the midst of a structure and I guess the other members of the structure got corrupted or who knows. I have no idea if there is a risk of the remainder of the structures controlling disks and stuff getting out-of-sync. Maybe, I need the fence instruction or the CLFLUSH.
The cool thing is, I added a #prefetch compiler directive. (I wrote my own compiler)
Now, in my start-up scripts or makefile scripts, you place #prefetch and the other core goes to work loading and uncompressing and hands the result to the main core when it comes to a #include. I shaved maybe 5-10% off of my compile and boot times.
Code: Select all
Cd("/LT/Utils/Boot");;
#prefetch "InsBoot"
Cd("/LT/Utils");;
#prefetch "Disk20"
#prefetch "Diff"
#prefetch "Grep"
#prefetch "LineCnt"
#prefetch "Merge"
#prefetch "S2T"
#prefetch "IDE"
#prefetch "EditFmtFun"
#prefetch "LinkChk"
#prefetch "HeapLog"
#prefetch "ListFile"
#prefetch "MemRep"
#prefetch "BinRep"
Cd("/LT/Accts/TAD");;
#prefetch "HOME/Private/Adam4"
#prefetch "TADAdam"
#prefetch "Distribute"
#prefetch "PlugIns"
Cd("/LT/Utils/Boot");;
#include_text "InsBoot"
Cd("/LT/Utils");;
#include_text "Disk20"
#include_text "Diff"
#include_text "Grep"
#include_text "LineCnt"
#include_text "Merge"
#include_text "S2T"
#include_text "IDE"
#include_text "EditFmtFun"
#include_text "LinkChk"
#include_text "HeapLog"
#include_text "ListFile"
#include_text "MemRep"
//$FG,4$Not installed by default$FG$
//$FG,2$#include_text "Dollar"$FG$
#include_text "BinRep"