Difference between revisions of "Unit Threads"
Line 7,744: | Line 7,744: | ||
<pre style="border: 0; padding-bottom:0px;">function TaskerGetCount:LongWord; inline;</pre> | <pre style="border: 0; padding-bottom:0px;">function TaskerGetCount:LongWord; inline;</pre> | ||
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current tasker count</div> | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current tasker count</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | '''RTL initialize and exit functions''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure SysInitProc;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure SysExitProc;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SysInitCompleted:Boolean;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | |||
+ | '''RTL process functions''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SysGetProcessID:SizeUInt;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | |||
+ | '''RTL thread manager functions''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ThreadMain(Parameter:Pointer):PtrInt;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SysBeginThread(SignalAction:Pointer; StackSize:PtrUInt; ThreadFunction:TThreadFunc; ThreadParameter:Pointer; CreationFlags:DWORD; var ThreadId:TThreadID):TThreadID;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SysBeginThreadEx(SignalAction:Pointer; StackSize:PtrUInt; ThreadFunction:TThreadFunc; ThreadParameter:Pointer; CreationFlags:DWORD; Priority,Affinity,CPU:LongWord; Name:PChar; var ThreadId:TThreadID):TThreadID;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure SysEndThread(ExitCode:DWORD);</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SysSuspendThread(ThreadHandle:TThreadID):DWORD;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SysResumeThread(ThreadHandle:TThreadID):DWORD;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SysKillThread(ThreadHandle:TThreadID):DWORD;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SysCloseThread(ThreadHandle:TThreadID):DWORD;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure SysThreadSwitch;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SysWaitForThreadTerminate(ThreadHandle:TThreadID; TimeoutMs:LongInt):DWORD;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Timeout''' | ||
+ | | 0=No Timeout | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SysThreadSetPriority(ThreadHandle:TThreadID; Priority:LongInt):Boolean; </pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | -15..+15, 0=Normal | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SysThreadGetPriority(ThreadHandle:TThreadID):LongInt;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SysGetCurrentThreadId:TThreadID;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure SysInitCriticalSection(var CriticalSection);</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure SysDoneCriticalSection(var CriticalSection);</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure SysEnterCriticalSection(var CriticalSection);</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SysTryEnterCriticalSection(var CriticalSection):LongInt;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure SysLeaveCriticalSection(var CriticalSection);</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure SysInitThreadVar(var Offset:DWORD; Size:DWORD);</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SysRelocateThreadVar(Offset:DWORD):Pointer;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure SysAllocateThreadVars;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure SysReleaseThreadVars;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SysBasicEventCreate(EventAttributes:Pointer; AManualReset,InitialState:Boolean; const Name:AnsiString):PEventState;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure SysBasicEventDestroy(State:PEventState);</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure SysBasicEventResetEvent(State:PEventState);</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure SysBasicEventSetEvent(State:PEventState);</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SysBasicEventWaitFor(Timeout:Cardinal; State:PEventState):LongInt; </pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | 0=No Timeout | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SysRTLEventCreate:PRTLEvent;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure SysRTLEventDestroy(AEvent:PRTLEvent);</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure SysRTLEventSetEvent(AEvent:PRTLEvent);</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure SysRTLEventResetEvent(AEvent:PRTLEvent);</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure SysRTLEventWaitFor(AEvent:PRTLEvent);</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure SysRTLEventWaitForTimeout(AEvent:PRTLEvent; Timeout:LongInt);</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Timeout''' | ||
+ | | 0=No Timeout | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SysSemaphoreInit:Pointer;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure SysSemaphoreDestroy(const Semaphore:Pointer);</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure SysSemaphorePost(const Semaphore:Pointer);</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure SysSemaphoreWait(const Semaphore:Pointer);</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | |||
+ | '''Thread helper functions''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SpinGetCount:LongWord; inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MutexGetCount:LongWord; inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function CriticalSectionGetCount:LongWord; inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SemaphoreGetCount:LongWord; inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SynchronizerGetCount:LongWord; inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ListGetCount:LongWord; inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function QueueGetCount:LongWord; inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ThreadGetCount:LongWord; inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ThreadTlsGetCount:LongWord; inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ThreadAllocateStack(StackSize:LongWord):Pointer;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure ThreadReleaseStack(StackBase:Pointer; StackSize:LongWord);</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ThreadSetupStack(StackBase:Pointer; StartProc:TThreadStart; ReturnProc:TThreadEnd; Parameter:Pointer):Pointer;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ThreadSnapshotCreate:PThreadSnapshot;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ThreadSnapshotDestroy(ASnapshot:PThreadSnapshot):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MessageslotGetCount:LongWord; inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MailslotGetCount:LongWord; inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function BufferGetCount:LongWord; inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function EventGetCount:LongWord; inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function TimerGetCount:LongWord; inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function WorkerGetCount:LongWord; inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function WorkerGetPriorityCount:LongWord; inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function TaskerGetCount:LongWord; inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ListTypeToString(ListType:LongWord):String;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function QueueTypeToString(QueueType:LongWord):String;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ThreadTypeToString(ThreadType:LongWord):String;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ThreadStateToString(ThreadState:LongWord):String;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ThreadPriorityToString(ThreadPriority:LongWord):String;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure ThreadLog(Level:LongWord; const AText:String);</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure ThreadLogInfo(const AText:String);</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure ThreadLogError(const AText:String);</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure ThreadLogDebug(const AText:String);</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | |||
+ | '''Scheduler helper functions''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SchedulerGetListFlags(ListType:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SchedulerGetQueueFlags(QueueType:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SchedulerGetQueueHandle(CPUID:LongWord; QueueType:LongWord):TQueueHandle;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SchedulerGetQueueHandleEx(CPUID:LongWord; Priority:LongWord):TQueueHandle;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SchedulerGetThreadCount(CPUID:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SchedulerGetThreadQuantum(CPUID:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SchedulerGetThreadHandle(CPUID:LongWord; ThreadType:LongWord):TThreadHandle;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SchedulerGetPriorityMask(CPUID:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SchedulerGetPriorityQuantum(Priority:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SchedulerSetPriorityQuantum(Priority,Quantum:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SchedulerGetMigrationQuantum:LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SchedulerGetStarvationQuantum(CPUID:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SchedulerGetThreadNext:LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SchedulerGetThreadMigration:LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SchedulerGetThreadPreempt(CPUID:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SchedulerGetThreadAllocation(CPUID:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SchedulerMigrationToString(Migration:LongWord):String;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SchedulerPreemptToString(Preempt:LongWord):String;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SchedulerAllocationToString(Allocation:LongWord):String;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | |||
+ | '''Timer helper functions''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function TimerGetListFlags:LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function TimerGetMessageslotFlags:LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | |||
+ | '''Worker helper functions''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function WorkerGetMessageslotFlags:LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" |
Revision as of 07:18, 21 April 2017
Return to Unit Reference
Contents
[hide]Description
Ultibo Threads interface unit
Locking Primitives
Spin -
A simple spin lock for fast mutually exclusive access to data. Threads "spin" while waiting to acquire the lock and do not yield the CPU unless pre-empted.
Non recursive (can only be acquired once by the same thread)
Includes IRQ/FIQ entry and exit routines to Save/Restore the IRQ/FIQ state.
Suitable for use by Interrupt handlers if non interrupt callers use the IRQ/FIQ entry and exit routines to Lock and Unlock.
Suitable for use on multiprocessor systems if the lock is allocated from shared memory (Determined during initialization).
Not recommended for long held operations or holding during I/O operations.
Access is not serialized, the next thread to try obtaining the lock when it is released will succeed even if that thread was not the first waiting.
Usage:
Create/Destroy
Spin locks are created using SpinCreate() and destroyed using SpinDestroy(), these functions should not be called from within an Interrupt handler. Lock/Unlock (Data accessed only by threads)
To synchronize data access between threads each thread should call SpinLock() before accessing the data and SpinUnlock() when finished accessing the data. These calls do not affect the state of IRQs or FIQs and therefore do not impact interrupt latency. Lock/Unlock (Data accessed by threads and interrupt handlers)
To use a Spin lock to synchronise data access between threads and an interrupt handler each thread should call SpinLockIRQ() or SpinLockFIQ(), depending on whether the interrupt handler is servicing IRQ or FIQ requests, before accessing the data and SpinUnlockIRQ() or SpinUnlockFIQ() when finished accessing the data. These calls disable interrupts before acquiring the lock (with deadlock protection) and restore interrupts after releaseing the lock and therefore should only be used to protect very short sections of code accessing shared data to minimize the impact on interrupt latency.
Interrupt handlers should call SpinLock() before accessing the data and SpinUnlock() when finished accessing the data. In a Uniprocessor system it is technically not necessary for interrupt handlers to call lock/unlock as the use of IRQ/FIQ disable/enable will prevent interrupt handlers from executing while a thread has the lock. On a Multiprocessor system however interrupt handlers can execute on one processor while a thread is executing on another (which will not deadlock), to correctly synchronize data access both threads and interrupt handlers should call the appropriate lock/unlock before and after access to the data.
Lock Hierachy -
It is safe to acquire one lock using SpinLock() then another lock using SpinLock() and then release them in reverse order.
It is also safe to acquire one lock using SpinLock() then another lock using SpinLockIRQ(or FIQ)() and then release them in reverse order.
It is NOT safe to acquire one lock using SpinLockIRQ(or FIQ)() then another lock using SpinLock() and then release them in reverse order. This is because the first SpinLockIRQ(or FIQ)() can disable the scheduling and prevent thread preemption. If another thread is already holding the second lock then this sequence will deadlock (except on a multicore system where the other thread is running on a different CPU).
It is also safe to acquire one lock using SpinLockIRQ(or FIQ)() then another lock using SpinLockIRQ(or FIQ)() and then release them in reverse order. In this case you must ensure that any thread aquiring the second lock also calls SpinLockIRQ(or FIQ)() to thereby avoid the deadlock.
It is NOT safe to acquire one lock using SpinLockIRQ(or FIQ)() then another lock using SpinLockIRQ(or FIQ)() and then release them in the SAME order. If the situation absolutely requires this behavious then you must use SpinExchangeIRQ(or FIQ)() when holding both locks in order to reverse the order of the IRQ or FIQ renabling.
Mutex -
A mutually exclusive lock for controlling access to data. Threads yield while waiting to acquire the lock.
Non recursive (can only be acquired once by the same thread) (Recursive if MUTEX_FLAG_RECURSIVE specified)
Not suitable for use by Interrupt handlers.
Suitable for use on multiprocessor systems if the lock is allocated from shared memory (Determined during initialization).
Recommended for long held operations or holding during I/O operations.
Access is not serialized, the next thread to try obtaining the lock when it is released will succeed even if that thread was not the first waiting.
CriticalSection -
A mutually exlusive lock for serializing access to data. Threads are placed on a wait list while waiting to acquire the lock.
Recursive (can be acquired multiple times by the same thread)
Not suitable for use by Interrupt handlers.
Suitable for use on multiprocessor systems.
Recommended for long held operations or holding during I/O operations.
Access is serialized, the next thread to obtain the lock when it is released will be the thread that has been waiting longest.
Semaphore -
Suitable for use by Interrupt handlers for signaling only if created with SEMAPHORE_FLAG_IRQ or FIQ (Interrupt handlers must not call wait).
Suitable for use on multiprocessor systems.
Access is serialized, the next thread to acquire the semaphore when it is signaled will be the thread that has been waiting longest.
Synchronizer -
A reader/writer lock for serializing multiple concurrent reads and single writes to data. Threads are placed on a wait list while waiting to acquire the lock.
Recursive (reader lock can be acquired multiple times by the same thread or by other threads/writer lock can be acquired multiple times by the same thread) Not suitable for use by Interrupt handlers.
Suitable for use on multiprocessor systems.
Recommended for long held operations or holding during I/O operations.
Access is serialized, the next thread to obtain the lock when it is released will be the thread that has been waiting longest.
Constants
LOCK_FLAG_*
SPIN_SIGNATURE_*
SPIN_STATE_*
MUTEX_SIGNATURE_*
MUTEX_STATE_*
MUTEX_FLAG_*
CRITICAL_SECTION_SIGNATURE_*
CRITICAL_SECTION_STATE_*
SEMAPHORE_SIGNATURE_*
SEMAPHORE_FLAG_*
SYNCHRONIZER_SIGNATURE_*
SYNCHRONIZER_STATE_*
SYNCHRONIZER_FLAG_*
LIST_SIGNATURE_*
LIST_TYPE_*
LIST_FLAG_*
QUEUE_SIGNATURE_*
QUEUE_TYPE_*
QUEUE_FLAG_*
QUEUE_KEY_*
THREAD_SIGNATURE_*
THREAD_TYPE_*
THREAD_STATE_*
THREAD_PRIORITY_*
THREAD_NAME_*
*_THREAD_PRIORITY
THREAD_CREATE_*
THREAD_TLS_*
THREAD_TLS_FLAG_*
THREAD_LISTS_*
MESSAGESLOT_SIGNATURE_*
MESSAGESLOT_FLAG_*
MAILSLOT_SIGNATURE_*
BUFFER_SIGNATURE_*
BUFFER_FLAG_*
EVENT_SIGNATURE_*
EVENT_STATE_*
EVENT_FLAG_*
TIMER_SIGNATURE_*
TIMER_STATE_*
TIMER_FLAG_*
TIMER_KEY_*
WORKER_SIGNATURE_*
WORKER_FLAG_*
TASKER_TASK_*
SCHEDULER_MIGRATION_*
SCHEDULER_PREEMPT_*
SCHEDULER_ALLOCATION_*
SCHEDULER_MASK_*
SCHEDULER_QUANTUM_*
THREAD_LOG_*
Type definitions
Spin entry
Mutex entry
Critical section entry
Semaphore entry
Synchronizer entry
List entry
List element
List handles
PListHandles = ^TListHandles;
TListHandles = array[0..THREAD_LISTS_MAXIMUM - 1] of TListHandle;
Queue entry
Queue element
Message list
Message
Thread entry
Thread snapshot
Messageslot entry
Mailslot entry
Buffer entry
Buffer item
Event entry
Timer list
Timer item
Timer entry
Worker request
Tasker list
Tasker task
Tasker thread send message
Tasker messageslot send
Tasker semaphore signal
Thread info
CPU start
TCPUStart = procedure(CPUID:LongWord);
|
Primary initialization
TPrimaryInit = procedure;
|
Scheduler initialization
TSchedulerInit = procedure;
|
Scheduler start
TSchedulerStart = procedure(CPUID:LongWord);
|
Secondary initialization
TSecondaryInit = procedure;
|
Secondary boot
TSecondaryBoot = procedure(CPUID:LongWord);
|
Spin lock
TSpinLock = function(Spin:PSpinEntry):LongWord;
|
Spin unlock
TSpinUnlock = function(Spin:PSpinEntry):LongWord;
|
Spin lock IRQ
TSpinLockIRQ = function(Spin:PSpinEntry):LongWord;
|
Spin unlock IRQ
TSpinUnlockIRQ = function(Spin:PSpinEntry):LongWord;
|
Spin lock FIQ
TSpinLockFIQ = function(Spin:PSpinEntry):LongWord;
|
Spin unlock FIQ
TSpinUnlockFIQ = function(Spin:PSpinEntry):LongWord;
|
Spin lock IRQ/FIQ
TSpinLockIRQFIQ = function(Spin:PSpinEntry):LongWord;
|
Spin unlock IRQ/FIQ
TSpinUnlockIRQFIQ = function(Spin:PSpinEntry):LongWord;
|
Spin check IRQ
TSpinCheckIRQ = function(Spin:PSpinEntry):Boolean;
|
Spin check FIQ
TSpinCheckFIQ = function(Spin:PSpinEntry):Boolean;
|
Spin exchange IRQ
TSpinExchangeIRQ = function(Spin1,Spin2:PSpinEntry):LongWord;
|
Spin exchange FIQ
TSpinExchangeFIQ = function(Spin1,Spin2:PSpinEntry):LongWord;
|
Spin mask exchange
TSpinMaskExchange = function(Spin1,Spin2:PSpinEntry):LongWord;
|
Mutex lock
TMutexLock = function(Mutex:PMutexEntry):LongWord;
|
Mutex unlock
TMutexUnlock = function(Mutex:PMutexEntry):LongWord;
|
Mutex try lock
TMutexTryLock = function(Mutex:PMutexEntry):LongWord;
|
Critical section lock
TCriticalSectionLock = function(CriticalSection:PCriticalSectionEntry):LongWord;
|
Critical section lock ex
TCriticalSectionLockEx = function(CriticalSection:PCriticalSectionEntry; Timeout:LongWord):LongWord;
|
Critical section unlock
TCriticalSectionUnlock = function(CriticalSection:PCriticalSectionEntry):LongWord;
|
Critical section try lock
TCriticalSectionTryLock = function(CriticalSection:PCriticalSectionEntry):LongWord;
|
Semaphore wait
TSemaphoreWait = function(Semaphore:PSemaphoreEntry):LongWord;
|
Semaphore wait ex
TSemaphoreWaitEx = function(Semaphore:PSemaphoreEntry; Timeout:LongWord):LongWord;
|
Semaphore signal
TSemaphoreSignal = function(Semaphore:PSemaphoreEntry):LongWord;
|
Synchronizer lock
TSynchronizerLock = function(Synchronizer:PSynchronizerEntry):LongWord;
|
Synchronizer lock ex
TSynchronizerLockEx = function(Synchronizer:PSynchronizerEntry; Timeout:LongWord):LongWord;
|
Synchronizer unlock
TSynchronizerUnlock = function(Synchronizer:PSynchronizerEntry):LongWord;
|
Synchronizer convert
TSynchronizerConvert = function(Synchronizer:PSynchronizerEntry):LongWord;
|
Synchronizer convert ex
TSynchronizerConvertEx = function(Synchronizer:PSynchronizerEntry; Timeout:LongWord):LongWord;
|
Messageslot send
TMessageslotSend = function(Messageslot:PMessageslotEntry; Message:PMessage):LongWord;
|
Messageslot receive
TMessageslotReceive = function(Messageslot:PMessageslotEntry; Message:PMessage):LongWord;
|
Messageslot receive ex
TMessageslotReceiveEx = function(Messageslot:PMessageslotEntry; Message:PMessage; Timeout:LongWord):LongWord;
|
Mailslot send
TMailslotSend = function(Mailslot:PMailslotEntry; Data:Integer):LongWord;
|
Mailslot send ex
TMailslotSendEx = function(Mailslot:PMailslotEntry; Data:Integer; Timeout:LongWord):LongWord;
|
Mailslot receive
TMailslotReceive = function(Mailslot:PMailslotEntry):Integer;
|
Mailslot receive ex
TMailslotReceiveEx = function(Mailslot:PMailslotEntry; Timeout:LongWord):Integer;
|
Buffer get
TBufferGet = function(Buffer:PBufferEntry):Pointer;
|
Buffer get ex
TBufferGetEx = function(Buffer:PBufferEntry; Timeout:LongWord):Pointer;
|
Buffer free
TBufferFree = function(Buffer:Pointer):LongWord;
|
Buffer iterate
TBufferIterate = function(Buffer:PBufferEntry; Previous:Pointer):Pointer;
|
Event wait
TEventWait = function(Event:PEventEntry):LongWord;
|
Event wait ex
TEventWaitEx = function(Event:PEventEntry; Timeout:LongWord):LongWord;
|
Event set
TEventSet = function(Event:PEventEntry):LongWord;
|
Event reset
TEventReset = function(Event:PEventEntry):LongWord;
|
Event pulse
TEventPulse = function(Event:PEventEntry):LongWord;
|
Timer enable
TTimerEnable = function(Timer:PTimerEntry):LongWord;
|
Timer enable ex
TTimerEnableEx = function(Timer:PTimerEntry; Interval:LongWord; Event:TTimerEvent; Data:Pointer):LongWord;
|
Timer disable
TTimerDisable = function(Timer:PTimerEntry):LongWord;
|
Timer check
TTimerCheck = function:LongWord;
|
Timer trigger
TTimerTrigger = function:LongWord;
|
Tasker check
TTaskerCheck = function:LongWord;
|
Tasker trigger
TTaskerTrigger = function:LongWord;
|
Thread get current
TThreadGetCurrent = function:TThreadHandle;
|
Thread set current
TThreadSetCurrent = function(Thread:TThreadHandle):LongWord;
|
Thread start
TThreadStart = function(Parameter:Pointer):PtrInt;
|
Thread end
TThreadEnd = procedure(ExitCode:LongWord);
|
Scheduler check
TSchedulerCheck = function(CPUID:LongWord):LongWord;
|
Scheduler wakeup
TSchedulerWakeup = function(CPUID:LongWord):LongWord;
|
Scheduler expire
TSchedulerExpire = function(CPUID:LongWord):LongWord;
|
Scheduler switch
TSchedulerSwitch = function(CPUID:LongWord; Thread:TThreadHandle):TThreadHandle;
|
Scheduler select
TSchedulerSelect = function(CPUID:LongWord; Thread:TThreadHandle; Yield:Boolean):TThreadHandle;
|
Scheduler reschedule
TSchedulerReschedule = function (Yield:Boolean):LongWord;
|
Scheduler migration enable
TSchedulerMigrationEnable = function:LongWord;
|
Scheduler migration disable
TSchedulerMigrationDisable = function:LongWord;
|
Scheduler preempt enable
TSchedulerPreemptEnable = function(CPUID:LongWord):LongWord;
|
Scheduler preempt disable
TSchedulerPreemptDisable = function(CPUID:LongWord):LongWord;
|
Scheduler allocation enable
TSchedulerAllocationEnable = function(CPUID:LongWord):LongWord;
|
Scheduler allocation disable
TSchedulerAllocationDisable = function(CPUID:LongWord):LongWord;
|
Thread setup stack
TThreadSetupStack = function(StackBase:Pointer; StartProc:TThreadStart; ReturnProc:TThreadEnd; Parameter:Pointer):Pointer;
|
Public variables
Thread logging
THREAD_DEFAULT_LOG_LEVEL:LongWord = THREAD_LOG_LEVEL_DEBUG;
|
Minimum level for Thread messages. Only messages with level greater than or equal to this will be printed. |
THREAD_LOG_ENABLED:Boolean;
|
Scheduler variables
SchedulerThreadNext:LongWord;
|
The CPU to assign the next created thread to, round robin incremented on each create (Protected by ThreadTableLock) |
SchedulerThreadMigration:LongWord;
|
Enable or Disable thread migration (SCHEDULER_MIGRATION_DISABLED or SCHEDULER_MIGRATION_ENABLED |
SchedulerMigrationQuantum:LongWord;
|
Quantum for thread migration checks (CPU 0 only) |
SchedulerThreadCount:array of LongWord;
|
Current number of ready threads per CPU (One per CPU, allocated by scheduler initialization) (Protected by InterlockedIncrement/Decrement) |
SchedulerThreadQuantum:array of LongWord;
|
Quantum of current thread per CPU (One per CPU, allocated by scheduler initialization) |
SchedulerThreadPreempt:array of LongWord;
|
Current state of thread preemption per CPU (eg SCHEDULER_PREEMPT_DISABLED) (One per CPU, allocated by scheduler initialization) |
SchedulerThreadAllocation:array of LongWord;
|
Current state of thread allocation per CPU (eg SCHEDULER_ALLOCATION_DISABLED) (One per CPU, allocated by scheduler initialization) |
SchedulerPriorityMask:array of LongWord;
|
Mask of ready threads at each priority level (One per CPU, allocated by scheduler initialization) (Protected by InterlockedOr/And) |
SchedulerYieldCurrent:array of LongBool;
|
Scheduler yield to current priority level status (One per CPU, allocated by scheduler initialization) |
SchedulerStarvationNext:array of LongWord;
|
Scheduler starvation priority round robin (One per CPU, allocated by scheduler initialization) |
SchedulerStarvationQuantum:array of LongWord;
|
Quantum for thread starvation checks per CPU (One per CPU, allocated by scheduler initialization) |
SchedulerNoneQueue:array of TQueueHandle;
|
Queue of threads that are ready to run at priority level none (One per CPU, allocated by scheduler initialization) |
SchedulerIdleQueue:array of TQueueHandle;
|
Queue of threads that are ready to run at priority level idle (One per CPU, allocated by scheduler initialization) |
SchedulerLowestQueue:array of TQueueHandle;
|
Queue of threads that are ready to run at priority level lowest (One per CPU, allocated by scheduler initialization) |
SchedulerLowerQueue:array of TQueueHandle;
|
Queue of threads that are ready to run at priority level lower (One per CPU, allocated by scheduler initialization) |
SchedulerNormalQueue:array of TQueueHandle;
|
Queue of threads that are ready to run at priority level normal (One per CPU, allocated by scheduler initialization) |
SchedulerHigherQueue:array of TQueueHandle;
|
Queue of threads that are ready to run at priority level higher (One per CPU, allocated by scheduler initialization) |
SchedulerHighestQueue:array of TQueueHandle;
|
Queue of threads that are ready to run at priority level highest (One per CPU, allocated by scheduler initialization) |
SchedulerCriticalQueue:array of TQueueHandle;
|
Queue of threads that are ready to run at priority level critical (One per CPU, allocated by scheduler initialization) |
SchedulerSleepQueue:array of TQueueHandle;
|
Queue of threads that are currently sleeping (One per CPU, allocated by scheduler initialization) |
SchedulerTimeoutQueue:array of TQueueHandle;
|
Queue of threads that are currently waiting with a timeout (One per CPU, allocated by scheduler initialization) |
SchedulerTerminationQueue:array of TQueueHandle;
|
Queue of threads that have been terminated (One per CPU, allocated by scheduler initialization) |
SchedulerLast:array of LongWord;
|
The timer value of the last scheduler interrupt (One per CPU, allocated by scheduler initialization) |
SchedulerInterrupts:array of LongWord;
|
Current number of scheduler interrupts per CPU (When this reaches SCHEDULER_INTERRUPTS_PER_SECOND then UtilizationLast is updated and UtilizationCurrent is reset) (One per CPU, allocated by scheduler initialization) |
Heap manager variables
HeapLock:THeapLock;
|
RTL thread manager variables
ThreadVarBlockSize:DWORD;
|
Inititalization handlers
PrimaryInitHandler:TPrimaryInit;
|
SchedulerInitHandler:TSchedulerInit;
|
SchedulerStartHandler:TSchedulerStart;
|
SecondaryInitHandler:TSecondaryInit;
|
SecondaryBootHandler:TSecondaryBoot;
|
SpinLock/Unlock handlers
SpinLockHandler:TSpinLock;
|
SpinUnlockHandler:TSpinUnlock;
|
SpinLockIRQHandler:TSpinLockIRQ;
|
SpinUnlockIRQHandler:TSpinUnlockIRQ;
|
SpinLockFIQHandler:TSpinLockFIQ;
|
SpinUnlockFIQHandler:TSpinUnlockFIQ;
|
SpinLockIRQFIQHandler:TSpinLockIRQFIQ;
|
SpinUnlockIRQFIQHandler:TSpinUnlockIRQFIQ;
|
SpinCheckIRQHandler:TSpinCheckIRQ;
|
SpinCheckFIQHandler:TSpinCheckFIQ;
|
SpinExchangeIRQHandler:TSpinExchangeIRQ;
|
SpinExchangeFIQHandler:TSpinExchangeFIQ;
|
SpinMaskExchangeHandler:TSpinMaskExchange;
|
MutexLock/Unlock handlers
MutexLockHandler:TMutexLock;
|
MutexUnlockHandler:TMutexUnlock;
|
MutexTryLockHandler:TMutexTryLock;
|
CriticalSection Lock/Unlock/TryLock handlers
CriticalSectionLockHandler:TCriticalSectionLock;
|
CriticalSectionLockExHandler:TCriticalSectionLockEx;
|
CriticalSectionUnlockHandler:TCriticalSectionUnlock;
|
CriticalSectionTryLockHandler:TCriticalSectionTryLock;
|
Semaphore Wait/Signal handlers
SemaphoreWaitHandler:TSemaphoreWait;
|
SemaphoreWaitExHandler:TSemaphoreWaitEx;
|
SemaphoreSignalHandler:TSemaphoreSignal;
|
Synchronizer Reader/WriterLock/Unlock handlers
SynchronizerReaderLockHandler:TSynchronizerLock;
|
SynchronizerWriterLockHandler:TSynchronizerLock;
|
SynchronizerReaderLockExHandler:TSynchronizerLockEx;
|
SynchronizerWriterLockExHandler:TSynchronizerLockEx;
|
SynchronizerReaderUnlockHandler:TSynchronizerUnlock;
|
SynchronizerWriterUnlockHandler:TSynchronizerUnlock;
|
SynchronizerReaderConvertHandler:TSynchronizerConvert;
|
SynchronizerWriterConvertHandler:TSynchronizerConvert;
|
SynchronizerReaderConvertExHandler:TSynchronizerConvertEx;
|
Messageslot send and receive handlers
MessageslotSendHandler:TMessageslotSend;
|
MessageslotReceiveHandler:TMessageslotReceive;
|
MessageslotReceiveExHandler:TMessageslotReceiveEx;
|
Mailslot send and receive handlers
MailslotSendHandler:TMailslotSend;
|
MailslotSendExHandler:TMailslotSendEx;
|
MailslotReceiveHandler:TMailslotReceive;
|
MailslotReceiveExHandler:TMailslotReceiveEx;
|
Buffer Get/GetEx/Free handlers
BufferGetHandler:TBufferGet;
|
BufferGetExHandler:TBufferGetEx;
|
BufferFreeHandler:TBufferFree;
|
BufferIterateHandler:TBufferIterate;
|
Event Wait/Set/Reset/Pulse handlers
EventWaitHandler:TEventWait;
|
EventWaitExHandler:TEventWaitEx;
|
EventSetHandler:TEventSet;
|
EventResetHandler:TEventReset;
|
EventPulseHandler:TEventPulse;
|
Timer Enable/Disable/Check/Trigger handlers
TimerEnableHandler:TTimerEnable;
|
TimerEnableExHandler:TTimerEnableEx;
|
TimerDisableHandler:TTimerDisable;
|
TimerCheckHandler:TTimerCheck;
|
TimerTriggerHandler:TTimerTrigger;
|
Tasker Check/Trigger handlers
TaskerCheckHandler:TTaskerCheck;
|
TaskerTriggerHandler:TTaskerTrigger;
|
Thread Get/SetCurrent handlers
ThreadGetCurrentHandler:TThreadGetCurrent;
|
ThreadSetCurrentHandler:TThreadSetCurrent;
|
Scheduler Check/Wakeup/Expire/Select/Switch handlers
SchedulerCheckHandler:TSchedulerCheck;
|
SchedulerWakeupHandler:TSchedulerWakeup;
|
SchedulerExpireHandler:TSchedulerExpire;
|
SchedulerSwitchHandler:TSchedulerSwitch;
|
SchedulerSelectHandler:TSchedulerSelect;
|
SchedulerRescheduleHandler:TSchedulerReschedule;
|
SchedulerMigrationEnableHandler:TSchedulerMigrationEnable;
|
SchedulerMigrationDisableHandler:TSchedulerMigrationDisable;
|
SchedulerPreemptEnableHandler:TSchedulerPreemptEnable;
|
SchedulerPreemptDisableHandler:TSchedulerPreemptDisable;
|
SchedulerAllocationEnableHandler:TSchedulerAllocationEnable;
|
SchedulerAllocationDisableHandler:TSchedulerAllocationDisable;
|
Thread SetupStack handlers
ThreadSetupStackHandler:TThreadSetupStack;
|
Function declarations
Initialization functions
procedure SchedulerStart(CPUID:LongWord);
procedure SecondaryBoot(CPUID:LongWord);
procedure SecondaryStart(CPUID:LongWord);
function IdleCalibrate:LongWord;
Spin functions
function SpinCreate:TSpinHandle; {$IFDEF SPIN_INLINE}inline; {$ENDIF}
function SpinCreateEx(InitialOwner:Boolean):TSpinHandle;
function SpinDestroy(Spin:TSpinHandle):LongWord;
function SpinOwner(Spin:TSpinHandle):TThreadHandle;
function SpinLock(Spin:TSpinHandle):LongWord; {$IFDEF SPIN_INLINE}inline; {$ENDIF}
function SpinUnlock(Spin:TSpinHandle):LongWord; {$IFDEF SPIN_INLINE}inline; {$ENDIF}
function SpinLockIRQ(Spin:TSpinHandle):LongWord; {$IFDEF SPIN_INLINE}inline; {$ENDIF}
function SpinUnlockIRQ(Spin:TSpinHandle):LongWord; {$IFDEF SPIN_INLINE}inline; {$ENDIF}
function SpinLockFIQ(Spin:TSpinHandle):LongWord; {$IFDEF SPIN_INLINE}inline; {$ENDIF}
function SpinUnlockFIQ(Spin:TSpinHandle):LongWord; {$IFDEF SPIN_INLINE}inline; {$ENDIF}
function SpinLockIRQFIQ(Spin:TSpinHandle):LongWord; {$IFDEF SPIN_INLINE}inline; {$ENDIF}
function SpinUnlockIRQFIQ(Spin:TSpinHandle):LongWord; {$IFDEF SPIN_INLINE}inline; {$ENDIF}
function SpinCheckIRQ(Spin:TSpinHandle):Boolean;
function SpinCheckFIQ(Spin:TSpinHandle):Boolean;
function SpinExchangeIRQ(Spin1,Spin2:TSpinHandle):LongWord;
function SpinExchangeFIQ(Spin1,Spin2:TSpinHandle):LongWord;
function SpinLockDefault(SpinEntry:PSpinEntry):LongWord;
function SpinUnlockDefault(SpinEntry:PSpinEntry):LongWord;
function SpinLockIRQDefault(SpinEntry:PSpinEntry):LongWord;
function SpinUnlockIRQDefault(SpinEntry:PSpinEntry):LongWord;
function SpinLockFIQDefault(SpinEntry:PSpinEntry):LongWord;
function SpinUnlockFIQDefault(SpinEntry:PSpinEntry):LongWord;
function SpinLockIRQFIQDefault(SpinEntry:PSpinEntry):LongWord;
function SpinUnlockIRQFIQDefault(SpinEntry:PSpinEntry):LongWord;
Mutex functions
function MutexCreate:TMutexHandle; {$IFDEF MUTEX_INLINE}inline; {$ENDIF}
function MutexCreateEx(InitialOwner:Boolean; SpinCount:LongWord; Flags:LongWord):TMutexHandle;
function MutexDestroy(Mutex:TMutexHandle):LongWord;
function MutexFlags(Mutex:TMutexHandle):LongWord;
function MutexCount(Mutex:TMutexHandle):LongWord;
function MutexOwner(Mutex:TMutexHandle):TThreadHandle;
function MutexLock(Mutex:TMutexHandle):LongWord; {$IFDEF MUTEX_INLINE}inline; {$ENDIF}
function MutexUnlock(Mutex:TMutexHandle):LongWord; {$IFDEF MUTEX_INLINE}inline; {$ENDIF}
function MutexTryLock(Mutex:TMutexHandle):LongWord; {$IFDEF MUTEX_INLINE}inline; {$ENDIF}
function MutexLockDefault(MutexEntry:PMutexEntry):LongWord;
function MutexUnlockDefault(MutexEntry:PMutexEntry):LongWord;
function MutexTryLockDefault(MutexEntry:PMutexEntry):LongWord;
Critical section functions
function CriticalSectionCreate:TCriticalSectionHandle;
function CriticalSectionCreateEx(InitialOwner:Boolean; SpinCount:LongWord):TCriticalSectionHandle;
function CriticalSectionDestroy(CriticalSection:TCriticalSectionHandle):LongWord;
function CriticalSectionCount(CriticalSection:TCriticalSectionHandle):LongWord;
function CriticalSectionOwner(CriticalSection:TCriticalSectionHandle):TThreadHandle;
function CriticalSectionSetSpinCount(CriticalSection:TCriticalSectionHandle; SpinCount:LongWord):LongWord;
function CriticalSectionLock(CriticalSection:TCriticalSectionHandle):LongWord;
function CriticalSectionLockEx(CriticalSection:TCriticalSectionHandle; Timeout:LongWord):LongWord;
function CriticalSectionUnlock(CriticalSection:TCriticalSectionHandle):LongWord;
function CriticalSectionTryLock(CriticalSection:TCriticalSectionHandle):LongWord;
Semaphore functions
function SemaphoreCreate(Count:LongWord):TSemaphoreHandle;
function SemaphoreCreateEx(Count,Maximum:LongWord; Flags:LongWord):TSemaphoreHandle;
function SemaphoreDestroy(Semaphore:TSemaphoreHandle):LongWord;
function SemaphoreCount(Semaphore:TSemaphoreHandle):LongWord;
function SemaphoreWait(Semaphore:TSemaphoreHandle):LongWord;
function SemaphoreWaitEx(Semaphore:TSemaphoreHandle; Timeout:LongWord):LongWord;
function SemaphoreSignal(Semaphore:TSemaphoreHandle):LongWord;
function SemaphoreSignalEx(Semaphore:TSemaphoreHandle; Count:LongWord; Previous:PLongWord):LongWord;
Synchronizer functions
function SynchronizerCreate:TSynchronizerHandle;
function SynchronizerCreateEx(InitialReader,InitialWriter:Boolean):TSynchronizerHandle;
function SynchronizerDestroy(Synchronizer:TSynchronizerHandle):LongWord;
function SynchronizerReaderCount(Synchronizer:TSynchronizerHandle):LongWord;
function SynchronizerReaderLast(Synchronizer:TSynchronizerHandle):TThreadHandle;
function SynchronizerReaderLock(Synchronizer:TSynchronizerHandle):LongWord;
function SynchronizerReaderLockEx(Synchronizer:TSynchronizerHandle; Timeout:LongWord):LongWord;
function SynchronizerReaderUnlock(Synchronizer:TSynchronizerHandle):LongWord;
function SynchronizerReaderConvert(Synchronizer:TSynchronizerHandle):LongWord;
function SynchronizerReaderConvertEx(Synchronizer:TSynchronizerHandle; Timeout:LongWord):LongWord;
function SynchronizerWriterCount(Synchronizer:TSynchronizerHandle):LongWord;
function SynchronizerWriterOwner(Synchronizer:TSynchronizerHandle):TThreadHandle;
function SynchronizerWriterLock(Synchronizer:TSynchronizerHandle):LongWord;
function SynchronizerWriterLockEx(Synchronizer:TSynchronizerHandle; Timeout:LongWord):LongWord;
function SynchronizerWriterUnlock(Synchronizer:TSynchronizerHandle):LongWord;
function SynchronizerWriterConvert(Synchronizer:TSynchronizerHandle):LongWord;
List functions
function ListCreate:TListHandle; {$IFDEF LIST_INLINE}inline; {$ENDIF}
function ListCreateEx(ListType:LongWord; Flags:LongWord):TListHandle;
function ListDestroy(List:TListHandle):LongWord;
function ListCount(List:TListHandle):LongWord;
function ListAddFirst(List:TListHandle; Element:PListElement):LongWord;
function ListAddLast(List:TListHandle; Element:PListElement):LongWord;
function ListGetThread(List:TListHandle; Thread:TThreadHandle):PListElement;
function ListGetFirst(List:TListHandle):PListElement;
function ListGetFirstEx(List:TListHandle; Remove:Boolean):PListElement;
function ListGetLast(List:TListHandle):PListElement;
function ListGetLastEx(List:TListHandle; Remove:Boolean):PListElement;
function ListInsert(List:TListHandle; Previous,Element:PListElement):LongWord;
function ListRemove(List:TListHandle; Element:PListElement):LongWord;
function ListIsEmpty(List:TListHandle):Boolean;
function ListNotEmpty(List:TListHandle):Boolean;
function ListLock(List:TListHandle):LongWord; {$IFDEF LIST_INLINE}inline; {$ENDIF}
function ListUnlock(List:TListHandle):LongWord; {$IFDEF LIST_INLINE}inline; {$ENDIF}
Queue functions
function QueueCreate:TQueueHandle; {$IFDEF QUEUE_INLINE}inline; {$ENDIF}
function QueueCreateEx(QueueType:LongWord; Flags:LongWord):TQueueHandle;
function QueueDestroy(Queue:TQueueHandle):LongWord;
function QueueCount(Queue:TQueueHandle):LongWord;
function QueueEnqueue(Queue:TQueueHandle; Thread:TThreadHandle):LongWord;
function QueueDequeue(Queue:TQueueHandle):TThreadHandle;
function QueueFirstKey(Queue:TQueueHandle):Integer;
function QueueLastKey(Queue:TQueueHandle):Integer;
function QueueInsertKey(Queue:TQueueHandle; Thread:TThreadHandle; Key:Integer):LongWord;
function QueueDeleteKey(Queue:TQueueHandle; Thread:TThreadHandle):LongWord;
function QueueIncrementKey(Queue:TQueueHandle):Integer;
function QueueDecrementKey(Queue:TQueueHandle):Integer;
function QueueIsEmpty(Queue:TQueueHandle):Boolean;
function QueueNotEmpty(Queue:TQueueHandle):Boolean;
function QueueLock(Queue:TQueueHandle):LongWord; {$IFDEF QUEUE_INLINE}inline; {$ENDIF}
function QueueUnlock(Queue:TQueueHandle):LongWord; {$IFDEF QUEUE_INLINE}inline; {$ENDIF}
Thread functions
function ThreadCreate(StartProc:TThreadStart; StackSize,Priority:LongWord; Name:PChar; Parameter:Pointer):TThreadHandle;
function ThreadCreateEx(StartProc:TThreadStart; StackSize,Priority,Affinity,CPU:LongWord; Name:PChar; Parameter:Pointer):TThreadHandle;
function ThreadDestroy(Thread:TThreadHandle):LongWord;
function ThreadGetCurrent:TThreadHandle; inline;
function ThreadSetCurrent(Thread:TThreadHandle):LongWord; inline;
function ThreadGetName(Thread:TThreadHandle):String;
function ThreadSetName(Thread:TThreadHandle; const Name:String):LongWord;
function ThreadGetCPU(Thread:TThreadHandle):LongWord;
function ThreadSetCPU(Thread:TThreadHandle; CPU:LongWord):LongWord;
function ThreadGetState(Thread:TThreadHandle):LongWord;
function ThreadGetLocale(Thread:TThreadHandle):LCID;
function ThreadSetLocale(Thread:TThreadHandle; Locale:LCID):LongWord;
function ThreadGetTimes(Thread:TThreadHandle; var CreateTime,ExitTime,KernelTime:Int64):LongWord;
function ThreadGetSwitchCount(Thread:TThreadHandle; var SwitchCount:Int64):LongWord;
function ThreadGetStackFree:LongWord;
function ThreadGetStackSize(Thread:TThreadHandle):LongWord;
function ThreadGetStackBase(Thread:TThreadHandle):PtrUInt;
function ThreadSetStackBase(Thread:TThreadHandle; StackBase:PtrUInt):LongWord;
function ThreadGetStackPointer(Thread:TThreadHandle):PtrUInt;
function ThreadGetExitCode(Thread:TThreadHandle):LongWord;
function ThreadGetAffinity(Thread:TThreadHandle):LongWord;
function ThreadSetAffinity(Thread:TThreadHandle; Affinity:LongWord):LongWord;
function ThreadGetPriority(Thread:TThreadHandle):LongWord;
function ThreadSetPriority(Thread:TThreadHandle; Priority:LongWord):LongWord;
function ThreadGetLastError:LongWord;
function ThreadSetLastError(LastError:LongWord):LongWord;
function ThreadGetWaitResult:LongWord;
function ThreadGetReceiveResult:LongWord;
function ThreadAllocTlsIndex:LongWord;
function ThreadAllocTlsIndexEx(Flags:LongWord):LongWord;
function ThreadReleaseTlsIndex(TlsIndex:LongWord):LongWord;
function ThreadGetTlsValue(TlsIndex:LongWord):Pointer;
function ThreadSetTlsValue(TlsIndex:LongWord; TlsValue:Pointer):LongWord;
function ThreadGetTlsPointer(Thread:TThreadHandle):Pointer;
function ThreadSetTlsPointer(Thread:TThreadHandle; TlsPointer:Pointer):LongWord;
function ThreadReady(Thread:TThreadHandle; Reschedule:Boolean):LongWord;
function ThreadTimeout(Thread:TThreadHandle):LongWord;
function ThreadWake(Thread:TThreadHandle):LongWord;
function ThreadMigrate(Thread:TThreadHandle; CPU:LongWord):LongWord;
function ThreadHalt(ExitCode:LongWord):LongWord;
function ThreadTerminate(Thread:TThreadHandle; ExitCode:LongWord):LongWord;
function ThreadYield:LongWord;
function ThreadSleep(Milliseconds:LongWord):LongWord;
function ThreadWait(List:TListHandle; Lock:TSpinHandle; Flags:LongWord):LongWord;
function ThreadWaitEx(List:TListHandle; Lock:TSpinHandle; Flags,Timeout:LongWord):LongWord;
function ThreadRelease(List:TListHandle):LongWord;
function ThreadAbandon(List:TListHandle):LongWord;
function ThreadWaitTerminate(Thread:TThreadHandle; Timeout:LongWord):LongWord;
function ThreadSuspend(Thread:TThreadHandle):LongWord;
function ThreadResume(Thread:TThreadHandle):LongWord;
function ThreadWaitMessage:LongWord;
function ThreadSendMessage(Thread:TThreadHandle; const Message:TMessage):LongWord;
function ThreadReceiveMessage(var Message:TMessage):LongWord;
function ThreadReceiveMessageEx(var Message:TMessage; Timeout:LongWord; Remove:Boolean):LongWord;
function ThreadAbandonMessage(Thread:TThreadHandle):LongWord;
function ThreadLock(Thread:TThreadHandle):LongWord;
function ThreadUnlock(Thread:TThreadHandle):LongWord;
Scheduler functions
function SchedulerCheck(CPUID:LongWord):LongWord;
function SchedulerWakeup(CPUID:LongWord):LongWord;
function SchedulerExpire(CPUID:LongWord):LongWord;
function SchedulerSwitch(CPUID:LongWord; Thread:TThreadHandle):TThreadHandle;
function SchedulerSelect(CPUID:LongWord; Thread:TThreadHandle; Yield:Boolean):TThreadHandle;
function SchedulerReschedule(Yield:Boolean):LongWord;
function SchedulerMigrationDisable:LongWord;
function SchedulerPreemptEnable(CPUID:LongWord):LongWord;
function SchedulerPreemptDisable(CPUID:LongWord):LongWord;
function SchedulerAllocationEnable(CPUID:LongWord):LongWord;
function SchedulerAllocationDisable(CPUID:LongWord):LongWord;
Messageslot functions
function MessageslotCreate:TMessageslotHandle;
function MessageslotCreateEx(Maximum:LongWord; Flags:LongWord):TMessageslotHandle;
function MessageslotDestroy(Messageslot:TMessageslotHandle):LongWord;
function MessageslotCount(Messageslot:TMessageslotHandle):LongWord;
function MessageslotSend(Messageslot:TMessageslotHandle; const Message:TMessage):LongWord;
function MessageslotReceive(Messageslot:TMessageslotHandle; var Message:TMessage):LongWord;
function MessageslotReceiveEx(Messageslot:TMessageslotHandle; var Message:TMessage; Timeout:LongWord):LongWord;
Mailslot functions
function MailslotCreate(Maximum:LongWord):TMailslotHandle;
function MailslotDestroy(Mailslot:TMailslotHandle):LongWord;
function MailslotCount(Mailslot:TMailslotHandle):LongWord;
function MailslotSend(Mailslot:TMailslotHandle; Data:Integer):LongWord;
function MailslotSendEx(Mailslot:TMailslotHandle; Data:Integer; Timeout:LongWord):LongWord;
function MailslotReceive(Mailslot:TMailslotHandle):Integer;
function MailslotReceiveEx(Mailslot:TMailslotHandle; Timeout:LongWord):Integer;
Buffer functions
function BufferCreateEx(Size,Count,Flags:LongWord):TBufferHandle;
function BufferGetEx(Buffer:TBufferHandle; Timeout:LongWord):Pointer;
function BufferIterate(Buffer:TBufferHandle; Previous:Pointer):Pointer;
Event functions
function EventCreate(ManualReset,InitialState:Boolean):TEventHandle;
function EventWaitEx(Event:TEventHandle; Timeout:LongWord):LongWord;
Timer functions
function TimerCreate(Interval:LongWord; Enabled,Reschedule:Boolean; Event:TTimerEvent; Data:Pointer):TTimerHandle;
function TimerCreateEx(Interval,State,Flags:LongWord; Event:TTimerEvent; Data:Pointer):TTimerHandle;
function TimerEnableEx(Timer:TTimerHandle; Interval:LongWord; Event:TTimerEvent; Data:Pointer):LongWord;
function TimerInsertKey(Timer:TTimerHandle; Key:Integer):LongWord;
Worker functions
function WorkerSchedule(Interval:LongWord; Task:TWorkerTask; Data:Pointer; Callback:TWorkerCallback):LongWord;
function WorkerScheduleEx(Interval,Flags:LongWord; Task:TWorkerTask; Data:Pointer; Callback:TWorkerCallback):TWorkerHandle;
function WorkerScheduleIRQ(Affinity:LongWord; Task:TWorkerTask; Data:Pointer; Callback:TWorkerCallback):LongWord;
function WorkerScheduleIRQEx(Affinity,Flags:LongWord; Task:TWorkerTask; Data:Pointer; Callback:TWorkerCallback):LongWord;
function WorkerScheduleFIQ(Affinity:LongWord; Task:TWorkerTask; Data:Pointer; Callback:TWorkerCallback):LongWord;
function WorkerScheduleFIQEx(Affinity,Flags:LongWord; Task:TWorkerTask; Data:Pointer; Callback:TWorkerCallback):LongWord;
function WorkerIncreaseEx(Count:LongWord; Priority:Boolean):LongWord;
function WorkerDecreaseEx(Count:LongWord; Priority:Boolean):LongWord;
Tasker functions
function TaskerThreadSendMessage(Thread:TThreadHandle; const Message:TMessage):LongWord;
function TaskerMessageslotSend(Messageslot:TMessageslotHandle; const Message:TMessage):LongWord;
function TaskerSemaphoreSignal(Semaphore:TSemaphoreHandle; Count:LongWord):LongWord;
function TaskerEnqueue(Task:PTaskerTask):LongWord;
function TaskerDequeue:PTaskerTask;
function TaskerCheck:LongWord;
function TaskerTrigger:LongWord;
RTL initialize and exit functions
RTL process functions
RTL thread manager functions
function SysBeginThread(SignalAction:Pointer; StackSize:PtrUInt; ThreadFunction:TThreadFunc; ThreadParameter:Pointer; CreationFlags:DWORD; var ThreadId:TThreadID):TThreadID;
function SysBeginThreadEx(SignalAction:Pointer; StackSize:PtrUInt; ThreadFunction:TThreadFunc; ThreadParameter:Pointer; CreationFlags:DWORD; Priority,Affinity,CPU:LongWord; Name:PChar; var ThreadId:TThreadID):TThreadID;
function SysWaitForThreadTerminate(ThreadHandle:TThreadID; TimeoutMs:LongInt):DWORD;
function SysThreadSetPriority(ThreadHandle:TThreadID; Priority:LongInt):Boolean;
function SysThreadGetPriority(ThreadHandle:TThreadID):LongInt;
function SysTryEnterCriticalSection(var CriticalSection):LongInt;
function SysBasicEventCreate(EventAttributes:Pointer; AManualReset,InitialState:Boolean; const Name:AnsiString):PEventState;
function SysBasicEventWaitFor(Timeout:Cardinal; State:PEventState):LongInt;
procedure SysRTLEventWaitForTimeout(AEvent:PRTLEvent; Timeout:LongInt);
Thread helper functions
procedure ThreadReleaseStack(StackBase:Pointer; StackSize:LongWord);
function ThreadSetupStack(StackBase:Pointer; StartProc:TThreadStart; ReturnProc:TThreadEnd; Parameter:Pointer):Pointer;
function ThreadSnapshotDestroy(ASnapshot:PThreadSnapshot):LongWord;
function ThreadPriorityToString(ThreadPriority:LongWord):String;
Scheduler helper functions
function SchedulerGetQueueFlags(QueueType:LongWord):LongWord;
function SchedulerGetQueueHandle(CPUID:LongWord; QueueType:LongWord):TQueueHandle;
function SchedulerGetQueueHandleEx(CPUID:LongWord; Priority:LongWord):TQueueHandle;
function SchedulerGetThreadHandle(CPUID:LongWord; ThreadType:LongWord):TThreadHandle;
function SchedulerGetPriorityQuantum(Priority:LongWord):LongWord;
function SchedulerSetPriorityQuantum(Priority,Quantum:LongWord):LongWord;
function SchedulerGetStarvationQuantum(CPUID:LongWord):LongWord;
function SchedulerGetThreadAllocation(CPUID:LongWord):LongWord;
function SchedulerMigrationToString(Migration:LongWord):String;
function SchedulerAllocationToString(Allocation:LongWord):String;
Timer helper functions
Worker helper functions
Return to Unit Reference