Unit Threads
From Ultibo.org
Return to Unit Reference
Contents
[hide]Description
To be documented
Constants
To be documented
Type definitions
To be documented
Public variables
To be documented
Function declarations
Initialization functions
[Expand]
procedure SchedulerStart(CPUID:LongWord);
Description: Initialize the thread scheduler for secondary CPUs (Where Applicable)
[Expand]
procedure SecondaryBoot(CPUID:LongWord);
Description: Boot the specified secondary CPU (Where Applicable)
[Expand]
procedure SecondaryStart(CPUID:LongWord);
Description: Startup procedure for secondary CPUs (Where Applicable)
[Expand]
function IdleCalibrate:LongWord;
Description: Calibrate the idle thread loop by counting the number of loops in 100ms
Spin functions
[Expand]
function SpinCreateEx(InitialOwner:Boolean):TSpinHandle;
Description: Create and insert a new Spin entry
[Expand]
function SpinDestroy(Spin:TSpinHandle):LongWord;
Description: Destroy and remove an existing Spin entry
[Expand]
function SpinOwner(Spin:TSpinHandle):TThreadHandle;
Description: Get the current owner of an existing Spin entry
[Expand]
function SpinLockIRQ(Spin:TSpinHandle):LongWord;
Description: Lock an existing Spin entry, disable IRQ and save the previous IRQ state
[Expand]
function SpinUnlockIRQ(Spin:TSpinHandle):LongWord;
Description: Unlock an existing Spin entry and restore the previous IRQ state
[Expand]
function SpinLockFIQ(Spin:TSpinHandle):LongWord;
Description: Lock an existing Spin entry, disable FIQ and save the previous FIQ state
[Expand]
function SpinUnlockFIQ(Spin:TSpinHandle):LongWord;
Description: Unlock an existing Spin entry and restore the previous FIQ state
[Expand]
function SpinLockIRQFIQ(Spin:TSpinHandle):LongWord;
Description: Lock an existing Spin entry, disable IRQ and FIQ and save the previous IRQ and FIQ state
[Expand]
function SpinUnlockIRQFIQ(Spin:TSpinHandle):LongWord;
Description: Unlock an existing Spin entry and restore the previous IRQ and FIQ state
[Expand]
function SpinCheckIRQ(Spin:TSpinHandle):Boolean;
Description: Check the mask that stores the previous IRQ state to determine if IRQ is enabled
[Expand]
function SpinCheckFIQ(Spin:TSpinHandle):Boolean;
Description: Check the mask that stores the previous FIQ state to determine if FIQ is enabled
[Expand]
function SpinExchangeIRQ(Spin1,Spin2:TSpinHandle):LongWord;
Description: Exchange the previous IRQ state between two Spin entries
[Expand]
function SpinExchangeFIQ(Spin1,Spin2:TSpinHandle):LongWord;
Description: Exchange the previous FIQ state between two Spin entries
Mutex functions
[Expand]
function MutexCreateEx(InitialOwner:Boolean; SpinCount:LongWord; Flags:LongWord):TMutexHandle;
Description: Create and insert a new Mutex entry
[Expand]
function MutexDestroy(Mutex:TMutexHandle):LongWord;
Description: Destroy and remove an existing Mutex entry
[Expand]
function MutexFlags(Mutex:TMutexHandle):LongWord;
Description: Get the current flags of an existing Mutex entry
[Expand]
function MutexCount(Mutex:TMutexHandle):LongWord;
Description: Get the current lock count of an existing Mutex entry
[Expand]
function MutexOwner(Mutex:TMutexHandle):TThreadHandle;
Description: Get the current owner of an existing Mutex entry
[Expand]
function MutexUnlock(Mutex:TMutexHandle):LongWord;
Description: Unlock an existing Mutex entry
[Expand]
function MutexTryLock(Mutex:TMutexHandle):LongWord;
Description: Try to lock an existing Mutex entry
Critical section functions
[Expand]
function CriticalSectionCreate:TCriticalSectionHandle;
Description: Create and insert a new CriticalSection entry
[Expand]
function CriticalSectionCreateEx(InitialOwner:Boolean; SpinCount:LongWord):TCriticalSectionHandle;
Description: Create and insert a new CriticalSection entry
[Expand]
function CriticalSectionDestroy(CriticalSection:TCriticalSectionHandle):LongWord;
Description: Destroy and remove an existing CriticalSection entry
[Expand]
function CriticalSectionCount(CriticalSection:TCriticalSectionHandle):LongWord;
Description: Get the current lock count of an existing CriticalSection entry
[Expand]
function CriticalSectionOwner(CriticalSection:TCriticalSectionHandle):TThreadHandle;
Description: Get the current owner of an existing CriticalSection entry
[Expand]
function CriticalSectionSetSpinCount(CriticalSection:TCriticalSectionHandle; SpinCount:LongWord):LongWord;
Description: Set the spin count of an existing CriticalSection entry
[Expand]
function CriticalSectionLock(CriticalSection:TCriticalSectionHandle):LongWord;
Description: Lock an existing CriticalSection entry
[Expand]
function CriticalSectionLockEx(CriticalSection:TCriticalSectionHandle; Timeout:LongWord):LongWord;
Description: Lock an existing CriticalSection entry
[Expand]
function CriticalSectionUnlock(CriticalSection:TCriticalSectionHandle):LongWord;
Description: Unlock an existing CriticalSection entry
[Expand]
function CriticalSectionTryLock(CriticalSection:TCriticalSectionHandle):LongWord;
Description: Try to lock an existing CriticalSection entry
Return to Unit Reference