Difference between revisions of "Unit Threads"
Line 103: | Line 103: | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Lock | + | <div style="font-size: 14px; padding-left: 12px;">'''Lock flag''' <code> LOCK_FLAG_* </code></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;" | ||
Line 123: | Line 123: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Spin | + | <div style="font-size: 14px; padding-left: 12px;">'''Spin signature''' <code> SPIN_SIGNATURE_* </code></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;" | ||
Line 134: | Line 134: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Spin state | + | <div style="font-size: 14px; padding-left: 12px;">'''Spin state''' <code> SPIN_STATE_* </code></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;" | ||
Line 148: | Line 148: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Mutex | + | <div style="font-size: 14px; padding-left: 12px;">'''Mutex signature''' <code> MUTEX_SIGNATURE_* </code></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;" | ||
Line 159: | Line 159: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Mutex state | + | <div style="font-size: 14px; padding-left: 12px;">'''Mutex state''' <code> MUTEX_STATE_* </code></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;" | ||
Line 173: | Line 173: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Mutex flags | + | <div style="font-size: 14px; padding-left: 12px;">'''Mutex flags''' <code> MUTEX_FLAG_* </code></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;" | ||
Line 187: | Line 187: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Critical section | + | <div style="font-size: 14px; padding-left: 12px;">'''Critical section signature''' <code> CRITICAL_SECTION_SIGNATURE_* </code></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;" | ||
Line 198: | Line 198: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Critical section state | + | <div style="font-size: 14px; padding-left: 12px;">'''Critical section state''' <code> CRITICAL_SECTION_STATE_* </code></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;" | ||
Line 212: | Line 212: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Semaphore | + | <div style="font-size: 14px; padding-left: 12px;">'''Semaphore signature''' <code> SEMAPHORE_SIGNATURE_* </code></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;" | ||
Line 223: | Line 223: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Semaphore flag | + | <div style="font-size: 14px; padding-left: 12px;">'''Semaphore flag''' <code> SEMAPHORE_FLAG_* </code></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;" | ||
Line 243: | Line 243: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Synchronizer | + | <div style="font-size: 14px; padding-left: 12px;">'''Synchronizer signature''' <code> SYNCHRONIZER_SIGNATURE_* </code></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;" | ||
Line 254: | Line 254: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Synchronizer state | + | <div style="font-size: 14px; padding-left: 12px;">'''Synchronizer state''' <code> SYNCHRONIZER_STATE_* </code></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;" | ||
Line 271: | Line 271: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Synchronizer flag | + | <div style="font-size: 14px; padding-left: 12px;">'''Synchronizer flag''' <code> SYNCHRONIZER_FLAG_* </code></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;" | ||
Line 288: | Line 288: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''List | + | <div style="font-size: 14px; padding-left: 12px;">'''List signature''' <code> LIST_SIGNATURE_* </code></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;" | ||
Line 299: | Line 299: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''List type | + | <div style="font-size: 14px; padding-left: 12px;">'''List type''' <code> LIST_TYPE_* </code></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;" | ||
Line 331: | Line 331: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''List flag | + | <div style="font-size: 14px; padding-left: 12px;">'''List flag''' <code> LIST_FLAG_* </code></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;" | ||
Line 351: | Line 351: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Queue | + | <div style="font-size: 14px; padding-left: 12px;">'''Queue signature''' <code> QUEUE_SIGNATURE_* </code></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;" | ||
Line 362: | Line 362: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Queue type | + | <div style="font-size: 14px; padding-left: 12px;">'''Queue type''' <code> QUEUE_TYPE_* </code></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;" | ||
Line 406: | Line 406: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Queue flag | + | <div style="font-size: 14px; padding-left: 12px;">'''Queue flag''' <code> QUEUE_FLAG_* </code></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;" | ||
Line 432: | Line 432: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Queue key | + | <div style="font-size: 14px; padding-left: 12px;">'''Queue key''' <code> QUEUE_KEY_* </code></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;" | ||
Line 449: | Line 449: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Thread | + | <div style="font-size: 14px; padding-left: 12px;">'''Thread signature''' <code> THREAD_SIGNATURE_* </code></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;" | ||
Line 460: | Line 460: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Thread type | + | <div style="font-size: 14px; padding-left: 12px;">'''Thread type''' <code> THREAD_TYPE_* </code></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;" | ||
Line 483: | Line 483: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Thread state | + | <div style="font-size: 14px; padding-left: 12px;">'''Thread state''' <code> THREAD_STATE_* </code></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;" | ||
Line 521: | Line 521: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Thread priority | + | <div style="font-size: 14px; padding-left: 12px;">'''Thread priority''' <code> THREAD_PRIORITY_* </code></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;" | ||
Line 580: | Line 580: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Thread name | + | <div style="font-size: 14px; padding-left: 12px;">'''Thread name''' <code> THREAD_NAME_* </code></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;" | ||
Line 617: | Line 617: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Thread priority | + | <div style="font-size: 14px; padding-left: 12px;">'''Thread priority''' <code> *_THREAD_PRIORITY </code></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;" | ||
Line 631: | Line 631: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Thread create | + | <div style="font-size: 14px; padding-left: 12px;">'''Thread create''' <code> THREAD_CREATE_* </code></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;" | ||
Line 645: | Line 645: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Thread TLS | + | <div style="font-size: 14px; padding-left: 12px;">'''Thread TLS''' <code> THREAD_TLS_* </code></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;" | ||
Line 667: | Line 667: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Thread TLS flag | + | <div style="font-size: 14px; padding-left: 12px;">'''Thread TLS flag''' <code> THREAD_TLS_FLAG_* </code></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;" | ||
Line 681: | Line 681: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Thread wait | + | <div style="font-size: 14px; padding-left: 12px;">'''Thread wait''' <code> THREAD_LISTS_* </code></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;" | ||
Line 692: | Line 692: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Messageslot | + | <div style="font-size: 14px; padding-left: 12px;">'''Messageslot signature''' <code> MESSAGESLOT_SIGNATURE_* </code></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;" | ||
Line 703: | Line 703: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Messageslot flag | + | <div style="font-size: 14px; padding-left: 12px;">'''Messageslot flag''' <code> MESSAGESLOT_FLAG_* </code></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;" | ||
Line 723: | Line 723: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Mailslot | + | <div style="font-size: 14px; padding-left: 12px;">'''Mailslot signature''' <code> MAILSLOT_SIGNATURE_* </code></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;" | ||
Line 734: | Line 734: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Buffer | + | <div style="font-size: 14px; padding-left: 12px;">'''Buffer signature''' <code> BUFFER_SIGNATURE_* </code></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;" | ||
Line 745: | Line 745: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Buffer flag | + | <div style="font-size: 14px; padding-left: 12px;">'''Buffer flag''' <code> BUFFER_FLAG_* </code></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;" | ||
Line 759: | Line 759: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Event | + | <div style="font-size: 14px; padding-left: 12px;">'''Event signature''' <code> EVENT_SIGNATURE_* </code></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;" | ||
Line 770: | Line 770: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Event state | + | <div style="font-size: 14px; padding-left: 12px;">'''Event state''' <code> EVENT_STATE_* </code></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;" | ||
Line 784: | Line 784: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Event flag | + | <div style="font-size: 14px; padding-left: 12px;">'''Event flag''' <code> EVENT_FLAG_* </code></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;" | ||
Line 801: | Line 801: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Timer | + | <div style="font-size: 14px; padding-left: 12px;">'''Timer signature''' <code> TIMER_SIGNATURE_* </code></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;" | ||
Line 812: | Line 812: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Timer state | + | <div style="font-size: 14px; padding-left: 12px;">'''Timer state''' <code> TIMER_STATE_* </code></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;" | ||
Line 826: | Line 826: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Timer flag | + | <div style="font-size: 14px; padding-left: 12px;">'''Timer flag''' <code> TIMER_FLAG_* </code></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;" | ||
Line 846: | Line 846: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Timer key | + | <div style="font-size: 14px; padding-left: 12px;">'''Timer key''' <code> TIMER_KEY_* </code></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;" | ||
Line 863: | Line 863: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Worker | + | <div style="font-size: 14px; padding-left: 12px;">'''Worker signature''' <code> WORKER_SIGNATURE_* </code></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;" | ||
Line 874: | Line 874: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Worker flag | + | <div style="font-size: 14px; padding-left: 12px;">'''Worker flag''' <code> WORKER_FLAG_* </code></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;" | ||
Line 906: | Line 906: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Tasker task | + | <div style="font-size: 14px; padding-left: 12px;">'''Tasker task''' <code> TASKER_TASK_* </code></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;" | ||
Line 923: | Line 923: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Scheduler migration | + | <div style="font-size: 14px; padding-left: 12px;">'''Scheduler migration''' <code> SCHEDULER_MIGRATION_* </code></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;" | ||
Line 937: | Line 937: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Scheduler preempt | + | <div style="font-size: 14px; padding-left: 12px;">'''Scheduler preempt''' <code> SCHEDULER_PREEMPT_* </code></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;" | ||
Line 951: | Line 951: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Scheduler allocation | + | <div style="font-size: 14px; padding-left: 12px;">'''Scheduler allocation''' <code> SCHEDULER_ALLOCATION_* </code></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;" | ||
Line 965: | Line 965: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Scheduler mask | + | <div style="font-size: 14px; padding-left: 12px;">'''Scheduler mask''' <code> SCHEDULER_MASK_* </code></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;" | ||
Line 997: | Line 997: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Scheduler quantum | + | <div style="font-size: 14px; padding-left: 12px;">'''Scheduler quantum''' <code> SCHEDULER_QUANTUM_* </code></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;" | ||
Line 1,029: | Line 1,029: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Thread logging | + | <div style="font-size: 14px; padding-left: 12px;">'''Thread logging''' <code> THREAD_LOG_* </code></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;" | ||
Line 2,963: | Line 2,963: | ||
|- | |- | ||
| <code>THREAD_DEFAULT_LOG_LEVEL:LongWord = THREAD_LOG_LEVEL_DEBUG;</code> | | <code>THREAD_DEFAULT_LOG_LEVEL:LongWord = THREAD_LOG_LEVEL_DEBUG;</code> | ||
− | | style="width: | + | | style="width: 40%;"|Minimum level for Thread messages. Only messages with level greater than or equal to this will be printed. |
|- | |- | ||
|} | |} | ||
Line 2,969: | Line 2,969: | ||
|- | |- | ||
| <code>THREAD_LOG_ENABLED:Boolean;</code> | | <code>THREAD_LOG_ENABLED:Boolean;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 2,978: | Line 2,978: | ||
|- | |- | ||
| <code>SchedulerThreadNext:LongWord;</code> | | <code>SchedulerThreadNext:LongWord;</code> | ||
− | | style="width: | + | | style="width: 40%;"|The CPU to assign the next created thread to, round robin incremented on each create (Protected by ThreadTableLock) |
|- | |- | ||
|} | |} | ||
Line 2,984: | Line 2,984: | ||
|- | |- | ||
| <code>SchedulerThreadMigration:LongWord;</code> | | <code>SchedulerThreadMigration:LongWord;</code> | ||
− | | style="width: | + | | style="width: 40%;"|Enable or Disable thread migration (SCHEDULER_MIGRATION_DISABLED or SCHEDULER_MIGRATION_ENABLED |
|- | |- | ||
|} | |} | ||
Line 2,990: | Line 2,990: | ||
|- | |- | ||
| <code>SchedulerMigrationQuantum:LongWord;</code> | | <code>SchedulerMigrationQuantum:LongWord;</code> | ||
− | | style="width: | + | | style="width: 40%;"|Quantum for thread migration checks (CPU 0 only) |
|- | |- | ||
|} | |} | ||
Line 2,996: | Line 2,996: | ||
|- | |- | ||
| <code>SchedulerThreadCount:array of LongWord;</code> | | <code>SchedulerThreadCount:array of LongWord;</code> | ||
− | | style="width: | + | | style="width: 40%;"|Current number of ready threads per CPU (One per CPU, allocated by scheduler initialization) (Protected by InterlockedIncrement/Decrement) |
|- | |- | ||
|} | |} | ||
Line 3,002: | Line 3,002: | ||
|- | |- | ||
| <code>SchedulerThreadQuantum:array of LongWord;</code> | | <code>SchedulerThreadQuantum:array of LongWord;</code> | ||
− | | style="width: | + | | style="width: 40%;"|Quantum of current thread per CPU (One per CPU, allocated by scheduler initialization) |
|- | |- | ||
|} | |} | ||
Line 3,008: | Line 3,008: | ||
|- | |- | ||
| <code>SchedulerThreadPreempt:array of LongWord;</code> | | <code>SchedulerThreadPreempt:array of LongWord;</code> | ||
− | | style="width: | + | | style="width: 40%;"|Current state of thread preemption per CPU (eg SCHEDULER_PREEMPT_DISABLED) (One per CPU, allocated by scheduler initialization) |
|- | |- | ||
|} | |} | ||
Line 3,014: | Line 3,014: | ||
|- | |- | ||
| <code>SchedulerThreadAllocation:array of LongWord;</code> | | <code>SchedulerThreadAllocation:array of LongWord;</code> | ||
− | | style="width: | + | | style="width: 40%;"|Current state of thread allocation per CPU (eg SCHEDULER_ALLOCATION_DISABLED) (One per CPU, allocated by scheduler initialization) |
|- | |- | ||
|} | |} | ||
Line 3,020: | Line 3,020: | ||
|- | |- | ||
| <code>SchedulerPriorityMask:array of LongWord;</code> | | <code>SchedulerPriorityMask:array of LongWord;</code> | ||
− | | style="width: | + | | style="width: 40%;"|Mask of ready threads at each priority level (One per CPU, allocated by scheduler initialization) (Protected by InterlockedOr/And) |
|- | |- | ||
|} | |} | ||
Line 3,026: | Line 3,026: | ||
|- | |- | ||
| <code>SchedulerYieldCurrent:array of LongBool;</code> | | <code>SchedulerYieldCurrent:array of LongBool;</code> | ||
− | | style="width: | + | | style="width: 40%;"|Scheduler yield to current priority level status (One per CPU, allocated by scheduler initialization) |
|- | |- | ||
|} | |} | ||
Line 3,032: | Line 3,032: | ||
|- | |- | ||
| <code>SchedulerStarvationNext:array of LongWord;</code> | | <code>SchedulerStarvationNext:array of LongWord;</code> | ||
− | | style="width: | + | | style="width: 40%;"|Scheduler starvation priority round robin (One per CPU, allocated by scheduler initialization) |
|- | |- | ||
|} | |} | ||
Line 3,038: | Line 3,038: | ||
|- | |- | ||
| <code>SchedulerStarvationQuantum:array of LongWord;</code> | | <code>SchedulerStarvationQuantum:array of LongWord;</code> | ||
− | | style="width: | + | | style="width: 40%;"|Quantum for thread starvation checks per CPU (One per CPU, allocated by scheduler initialization) |
|- | |- | ||
|} | |} | ||
Line 3,044: | Line 3,044: | ||
|- | |- | ||
| <code>SchedulerNoneQueue:array of TQueueHandle;</code> | | <code>SchedulerNoneQueue:array of TQueueHandle;</code> | ||
− | | style="width: | + | | style="width: 40%;"|Queue of threads that are ready to run at priority level none (One per CPU, allocated by scheduler initialization) |
|- | |- | ||
|} | |} | ||
Line 3,050: | Line 3,050: | ||
|- | |- | ||
| <code>SchedulerIdleQueue:array of TQueueHandle;</code> | | <code>SchedulerIdleQueue:array of TQueueHandle;</code> | ||
− | | style="width: | + | | style="width: 40%;"|Queue of threads that are ready to run at priority level idle (One per CPU, allocated by scheduler initialization) |
|- | |- | ||
|} | |} | ||
Line 3,056: | Line 3,056: | ||
|- | |- | ||
| <code>SchedulerLowestQueue:array of TQueueHandle;</code> | | <code>SchedulerLowestQueue:array of TQueueHandle;</code> | ||
− | | style="width: | + | | style="width: 40%;"|Queue of threads that are ready to run at priority level lowest (One per CPU, allocated by scheduler initialization) |
|- | |- | ||
|} | |} | ||
Line 3,062: | Line 3,062: | ||
|- | |- | ||
| <code>SchedulerLowerQueue:array of TQueueHandle;</code> | | <code>SchedulerLowerQueue:array of TQueueHandle;</code> | ||
− | | style="width: | + | | style="width: 40%;"|Queue of threads that are ready to run at priority level lower (One per CPU, allocated by scheduler initialization) |
|- | |- | ||
|} | |} | ||
Line 3,068: | Line 3,068: | ||
|- | |- | ||
| <code>SchedulerNormalQueue:array of TQueueHandle;</code> | | <code>SchedulerNormalQueue:array of TQueueHandle;</code> | ||
− | | style="width: | + | | style="width: 40%;"|Queue of threads that are ready to run at priority level normal (One per CPU, allocated by scheduler initialization) |
|- | |- | ||
|} | |} | ||
Line 3,074: | Line 3,074: | ||
|- | |- | ||
| <code>SchedulerHigherQueue:array of TQueueHandle;</code> | | <code>SchedulerHigherQueue:array of TQueueHandle;</code> | ||
− | | style="width: | + | | style="width: 40%;"|Queue of threads that are ready to run at priority level higher (One per CPU, allocated by scheduler initialization) |
|- | |- | ||
|} | |} | ||
Line 3,080: | Line 3,080: | ||
|- | |- | ||
| <code>SchedulerHighestQueue:array of TQueueHandle;</code> | | <code>SchedulerHighestQueue:array of TQueueHandle;</code> | ||
− | | style="width: | + | | style="width: 40%;"|Queue of threads that are ready to run at priority level highest (One per CPU, allocated by scheduler initialization) |
|- | |- | ||
|} | |} | ||
Line 3,086: | Line 3,086: | ||
|- | |- | ||
| <code>SchedulerCriticalQueue:array of TQueueHandle;</code> | | <code>SchedulerCriticalQueue:array of TQueueHandle;</code> | ||
− | | style="width: | + | | style="width: 40%;"|Queue of threads that are ready to run at priority level critical (One per CPU, allocated by scheduler initialization) |
|- | |- | ||
|} | |} | ||
Line 3,092: | Line 3,092: | ||
|- | |- | ||
| <code>SchedulerSleepQueue:array of TQueueHandle;</code> | | <code>SchedulerSleepQueue:array of TQueueHandle;</code> | ||
− | | style="width: | + | | style="width: 40%;"|Queue of threads that are currently sleeping (One per CPU, allocated by scheduler initialization) |
|- | |- | ||
|} | |} | ||
Line 3,098: | Line 3,098: | ||
|- | |- | ||
| <code>SchedulerTimeoutQueue:array of TQueueHandle;</code> | | <code>SchedulerTimeoutQueue:array of TQueueHandle;</code> | ||
− | | style="width: | + | | style="width: 40%;"|Queue of threads that are currently waiting with a timeout (One per CPU, allocated by scheduler initialization) |
|- | |- | ||
|} | |} | ||
Line 3,104: | Line 3,104: | ||
|- | |- | ||
| <code>SchedulerTerminationQueue:array of TQueueHandle;</code> | | <code>SchedulerTerminationQueue:array of TQueueHandle;</code> | ||
− | | style="width: | + | | style="width: 40%;"|Queue of threads that have been terminated (One per CPU, allocated by scheduler initialization) |
|- | |- | ||
|} | |} | ||
Line 3,110: | Line 3,110: | ||
|- | |- | ||
| <code>SchedulerLast:array of LongWord;</code> | | <code>SchedulerLast:array of LongWord;</code> | ||
− | | style="width: | + | | style="width: 40%;"|The timer value of the last scheduler interrupt (One per CPU, allocated by scheduler initialization) |
|- | |- | ||
|} | |} | ||
Line 3,116: | Line 3,116: | ||
|- | |- | ||
| <code>SchedulerInterrupts:array of LongWord;</code> | | <code>SchedulerInterrupts:array of LongWord;</code> | ||
− | | style="width: | + | | style="width: 40%;"|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) |
|- | |- | ||
|} | |} | ||
Line 3,125: | Line 3,125: | ||
|- | |- | ||
| <code>HeapLock:THeapLock;</code> | | <code>HeapLock:THeapLock;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,134: | Line 3,134: | ||
|- | |- | ||
| <code>ThreadVarBlockSize:DWORD;</code> | | <code>ThreadVarBlockSize:DWORD;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,143: | Line 3,143: | ||
|- | |- | ||
| <code>PrimaryInitHandler:TPrimaryInit;</code> | | <code>PrimaryInitHandler:TPrimaryInit;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,149: | Line 3,149: | ||
|- | |- | ||
| <code>SchedulerInitHandler:TSchedulerInit;</code> | | <code>SchedulerInitHandler:TSchedulerInit;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,155: | Line 3,155: | ||
|- | |- | ||
| <code>SchedulerStartHandler:TSchedulerStart;</code> | | <code>SchedulerStartHandler:TSchedulerStart;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,161: | Line 3,161: | ||
|- | |- | ||
| <code>SecondaryInitHandler:TSecondaryInit;</code> | | <code>SecondaryInitHandler:TSecondaryInit;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,167: | Line 3,167: | ||
|- | |- | ||
| <code>SecondaryBootHandler:TSecondaryBoot;</code> | | <code>SecondaryBootHandler:TSecondaryBoot;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,176: | Line 3,176: | ||
|- | |- | ||
| <code>SpinLockHandler:TSpinLock;</code> | | <code>SpinLockHandler:TSpinLock;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,182: | Line 3,182: | ||
|- | |- | ||
| <code>SpinUnlockHandler:TSpinUnlock;</code> | | <code>SpinUnlockHandler:TSpinUnlock;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,188: | Line 3,188: | ||
|- | |- | ||
| <code>SpinLockIRQHandler:TSpinLockIRQ;</code> | | <code>SpinLockIRQHandler:TSpinLockIRQ;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,194: | Line 3,194: | ||
|- | |- | ||
| <code>SpinUnlockIRQHandler:TSpinUnlockIRQ;</code> | | <code>SpinUnlockIRQHandler:TSpinUnlockIRQ;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,200: | Line 3,200: | ||
|- | |- | ||
| <code>SpinLockFIQHandler:TSpinLockFIQ;</code> | | <code>SpinLockFIQHandler:TSpinLockFIQ;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,206: | Line 3,206: | ||
|- | |- | ||
| <code>SpinUnlockFIQHandler:TSpinUnlockFIQ;</code> | | <code>SpinUnlockFIQHandler:TSpinUnlockFIQ;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,212: | Line 3,212: | ||
|- | |- | ||
| <code>SpinLockIRQFIQHandler:TSpinLockIRQFIQ;</code> | | <code>SpinLockIRQFIQHandler:TSpinLockIRQFIQ;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,218: | Line 3,218: | ||
|- | |- | ||
| <code>SpinUnlockIRQFIQHandler:TSpinUnlockIRQFIQ;</code> | | <code>SpinUnlockIRQFIQHandler:TSpinUnlockIRQFIQ;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,224: | Line 3,224: | ||
|- | |- | ||
| <code>SpinCheckIRQHandler:TSpinCheckIRQ;</code> | | <code>SpinCheckIRQHandler:TSpinCheckIRQ;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,230: | Line 3,230: | ||
|- | |- | ||
| <code>SpinCheckFIQHandler:TSpinCheckFIQ;</code> | | <code>SpinCheckFIQHandler:TSpinCheckFIQ;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,236: | Line 3,236: | ||
|- | |- | ||
| <code>SpinExchangeIRQHandler:TSpinExchangeIRQ;</code> | | <code>SpinExchangeIRQHandler:TSpinExchangeIRQ;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,242: | Line 3,242: | ||
|- | |- | ||
| <code>SpinExchangeFIQHandler:TSpinExchangeFIQ;</code> | | <code>SpinExchangeFIQHandler:TSpinExchangeFIQ;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,248: | Line 3,248: | ||
|- | |- | ||
| <code>SpinMaskExchangeHandler:TSpinMaskExchange;</code> | | <code>SpinMaskExchangeHandler:TSpinMaskExchange;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,257: | Line 3,257: | ||
|- | |- | ||
| <code>MutexLockHandler:TMutexLock;</code> | | <code>MutexLockHandler:TMutexLock;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,263: | Line 3,263: | ||
|- | |- | ||
| <code>MutexUnlockHandler:TMutexUnlock;</code> | | <code>MutexUnlockHandler:TMutexUnlock;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,269: | Line 3,269: | ||
|- | |- | ||
| <code>MutexTryLockHandler:TMutexTryLock;</code> | | <code>MutexTryLockHandler:TMutexTryLock;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,278: | Line 3,278: | ||
|- | |- | ||
| <code>CriticalSectionLockHandler:TCriticalSectionLock;</code> | | <code>CriticalSectionLockHandler:TCriticalSectionLock;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,284: | Line 3,284: | ||
|- | |- | ||
| <code>CriticalSectionLockExHandler:TCriticalSectionLockEx;</code> | | <code>CriticalSectionLockExHandler:TCriticalSectionLockEx;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,290: | Line 3,290: | ||
|- | |- | ||
| <code>CriticalSectionUnlockHandler:TCriticalSectionUnlock;</code> | | <code>CriticalSectionUnlockHandler:TCriticalSectionUnlock;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,296: | Line 3,296: | ||
|- | |- | ||
| <code>CriticalSectionTryLockHandler:TCriticalSectionTryLock;</code> | | <code>CriticalSectionTryLockHandler:TCriticalSectionTryLock;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,305: | Line 3,305: | ||
|- | |- | ||
| <code>SemaphoreWaitHandler:TSemaphoreWait;</code> | | <code>SemaphoreWaitHandler:TSemaphoreWait;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,311: | Line 3,311: | ||
|- | |- | ||
| <code>SemaphoreWaitExHandler:TSemaphoreWaitEx;</code> | | <code>SemaphoreWaitExHandler:TSemaphoreWaitEx;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,317: | Line 3,317: | ||
|- | |- | ||
| <code>SemaphoreSignalHandler:TSemaphoreSignal;</code> | | <code>SemaphoreSignalHandler:TSemaphoreSignal;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,326: | Line 3,326: | ||
|- | |- | ||
| <code>SynchronizerReaderLockHandler:TSynchronizerLock;</code> | | <code>SynchronizerReaderLockHandler:TSynchronizerLock;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,332: | Line 3,332: | ||
|- | |- | ||
| <code>SynchronizerWriterLockHandler:TSynchronizerLock;</code> | | <code>SynchronizerWriterLockHandler:TSynchronizerLock;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,338: | Line 3,338: | ||
|- | |- | ||
| <code>SynchronizerReaderLockExHandler:TSynchronizerLockEx;</code> | | <code>SynchronizerReaderLockExHandler:TSynchronizerLockEx;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,344: | Line 3,344: | ||
|- | |- | ||
| <code>SynchronizerWriterLockExHandler:TSynchronizerLockEx;</code> | | <code>SynchronizerWriterLockExHandler:TSynchronizerLockEx;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,350: | Line 3,350: | ||
|- | |- | ||
| <code>SynchronizerReaderUnlockHandler:TSynchronizerUnlock;</code> | | <code>SynchronizerReaderUnlockHandler:TSynchronizerUnlock;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,356: | Line 3,356: | ||
|- | |- | ||
| <code>SynchronizerWriterUnlockHandler:TSynchronizerUnlock;</code> | | <code>SynchronizerWriterUnlockHandler:TSynchronizerUnlock;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,362: | Line 3,362: | ||
|- | |- | ||
| <code>SynchronizerReaderConvertHandler:TSynchronizerConvert;</code> | | <code>SynchronizerReaderConvertHandler:TSynchronizerConvert;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,368: | Line 3,368: | ||
|- | |- | ||
| <code>SynchronizerWriterConvertHandler:TSynchronizerConvert;</code> | | <code>SynchronizerWriterConvertHandler:TSynchronizerConvert;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,374: | Line 3,374: | ||
|- | |- | ||
| <code>SynchronizerReaderConvertExHandler:TSynchronizerConvertEx;</code> | | <code>SynchronizerReaderConvertExHandler:TSynchronizerConvertEx;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,383: | Line 3,383: | ||
|- | |- | ||
| <code>MessageslotSendHandler:TMessageslotSend;</code> | | <code>MessageslotSendHandler:TMessageslotSend;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,389: | Line 3,389: | ||
|- | |- | ||
| <code>MessageslotReceiveHandler:TMessageslotReceive;</code> | | <code>MessageslotReceiveHandler:TMessageslotReceive;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,395: | Line 3,395: | ||
|- | |- | ||
| <code>MessageslotReceiveExHandler:TMessageslotReceiveEx;</code> | | <code>MessageslotReceiveExHandler:TMessageslotReceiveEx;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,404: | Line 3,404: | ||
|- | |- | ||
| <code>MailslotSendHandler:TMailslotSend;</code> | | <code>MailslotSendHandler:TMailslotSend;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,410: | Line 3,410: | ||
|- | |- | ||
| <code>MailslotSendExHandler:TMailslotSendEx;</code> | | <code>MailslotSendExHandler:TMailslotSendEx;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,416: | Line 3,416: | ||
|- | |- | ||
| <code>MailslotReceiveHandler:TMailslotReceive;</code> | | <code>MailslotReceiveHandler:TMailslotReceive;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,422: | Line 3,422: | ||
|- | |- | ||
| <code>MailslotReceiveExHandler:TMailslotReceiveEx;</code> | | <code>MailslotReceiveExHandler:TMailslotReceiveEx;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,431: | Line 3,431: | ||
|- | |- | ||
| <code>BufferGetHandler:TBufferGet;</code> | | <code>BufferGetHandler:TBufferGet;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,437: | Line 3,437: | ||
|- | |- | ||
| <code>BufferGetExHandler:TBufferGetEx;</code> | | <code>BufferGetExHandler:TBufferGetEx;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,443: | Line 3,443: | ||
|- | |- | ||
| <code>BufferFreeHandler:TBufferFree;</code> | | <code>BufferFreeHandler:TBufferFree;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,449: | Line 3,449: | ||
|- | |- | ||
| <code>BufferIterateHandler:TBufferIterate;</code> | | <code>BufferIterateHandler:TBufferIterate;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,458: | Line 3,458: | ||
|- | |- | ||
| <code>EventWaitHandler:TEventWait;</code> | | <code>EventWaitHandler:TEventWait;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,464: | Line 3,464: | ||
|- | |- | ||
| <code>EventWaitExHandler:TEventWaitEx;</code> | | <code>EventWaitExHandler:TEventWaitEx;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,470: | Line 3,470: | ||
|- | |- | ||
| <code>EventSetHandler:TEventSet;</code> | | <code>EventSetHandler:TEventSet;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,476: | Line 3,476: | ||
|- | |- | ||
| <code>EventResetHandler:TEventReset;</code> | | <code>EventResetHandler:TEventReset;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,482: | Line 3,482: | ||
|- | |- | ||
| <code>EventPulseHandler:TEventPulse;</code> | | <code>EventPulseHandler:TEventPulse;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,491: | Line 3,491: | ||
|- | |- | ||
| <code>TimerEnableHandler:TTimerEnable;</code> | | <code>TimerEnableHandler:TTimerEnable;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,497: | Line 3,497: | ||
|- | |- | ||
| <code>TimerEnableExHandler:TTimerEnableEx;</code> | | <code>TimerEnableExHandler:TTimerEnableEx;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,503: | Line 3,503: | ||
|- | |- | ||
| <code>TimerDisableHandler:TTimerDisable;</code> | | <code>TimerDisableHandler:TTimerDisable;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,509: | Line 3,509: | ||
|- | |- | ||
| <code>TimerCheckHandler:TTimerCheck;</code> | | <code>TimerCheckHandler:TTimerCheck;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,515: | Line 3,515: | ||
|- | |- | ||
| <code>TimerTriggerHandler:TTimerTrigger;</code> | | <code>TimerTriggerHandler:TTimerTrigger;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,524: | Line 3,524: | ||
|- | |- | ||
| <code>TaskerCheckHandler:TTaskerCheck;</code> | | <code>TaskerCheckHandler:TTaskerCheck;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,530: | Line 3,530: | ||
|- | |- | ||
| <code>TaskerTriggerHandler:TTaskerTrigger;</code> | | <code>TaskerTriggerHandler:TTaskerTrigger;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,539: | Line 3,539: | ||
|- | |- | ||
| <code>ThreadGetCurrentHandler:TThreadGetCurrent;</code> | | <code>ThreadGetCurrentHandler:TThreadGetCurrent;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,545: | Line 3,545: | ||
|- | |- | ||
| <code>ThreadSetCurrentHandler:TThreadSetCurrent;</code> | | <code>ThreadSetCurrentHandler:TThreadSetCurrent;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,554: | Line 3,554: | ||
|- | |- | ||
| <code>SchedulerCheckHandler:TSchedulerCheck;</code> | | <code>SchedulerCheckHandler:TSchedulerCheck;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,560: | Line 3,560: | ||
|- | |- | ||
| <code>SchedulerWakeupHandler:TSchedulerWakeup;</code> | | <code>SchedulerWakeupHandler:TSchedulerWakeup;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,566: | Line 3,566: | ||
|- | |- | ||
| <code>SchedulerExpireHandler:TSchedulerExpire;</code> | | <code>SchedulerExpireHandler:TSchedulerExpire;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,572: | Line 3,572: | ||
|- | |- | ||
| <code>SchedulerSwitchHandler:TSchedulerSwitch;</code> | | <code>SchedulerSwitchHandler:TSchedulerSwitch;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,578: | Line 3,578: | ||
|- | |- | ||
| <code>SchedulerSelectHandler:TSchedulerSelect;</code> | | <code>SchedulerSelectHandler:TSchedulerSelect;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,584: | Line 3,584: | ||
|- | |- | ||
| <code>SchedulerRescheduleHandler:TSchedulerReschedule;</code> | | <code>SchedulerRescheduleHandler:TSchedulerReschedule;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,590: | Line 3,590: | ||
|- | |- | ||
| <code>SchedulerMigrationEnableHandler:TSchedulerMigrationEnable;</code> | | <code>SchedulerMigrationEnableHandler:TSchedulerMigrationEnable;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,596: | Line 3,596: | ||
|- | |- | ||
| <code>SchedulerMigrationDisableHandler:TSchedulerMigrationDisable;</code> | | <code>SchedulerMigrationDisableHandler:TSchedulerMigrationDisable;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,602: | Line 3,602: | ||
|- | |- | ||
| <code>SchedulerPreemptEnableHandler:TSchedulerPreemptEnable;</code> | | <code>SchedulerPreemptEnableHandler:TSchedulerPreemptEnable;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,608: | Line 3,608: | ||
|- | |- | ||
| <code>SchedulerPreemptDisableHandler:TSchedulerPreemptDisable;</code> | | <code>SchedulerPreemptDisableHandler:TSchedulerPreemptDisable;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,614: | Line 3,614: | ||
|- | |- | ||
| <code>SchedulerAllocationEnableHandler:TSchedulerAllocationEnable;</code> | | <code>SchedulerAllocationEnableHandler:TSchedulerAllocationEnable;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,620: | Line 3,620: | ||
|- | |- | ||
| <code>SchedulerAllocationDisableHandler:TSchedulerAllocationDisable;</code> | | <code>SchedulerAllocationDisableHandler:TSchedulerAllocationDisable;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} | ||
Line 3,629: | Line 3,629: | ||
|- | |- | ||
| <code>ThreadSetupStackHandler:TThreadSetupStack;</code> | | <code>ThreadSetupStackHandler:TThreadSetupStack;</code> | ||
− | | style="width: | + | | style="width: 40%;"| |
|- | |- | ||
|} | |} |
Revision as of 04:32, 27 March 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 message slot 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/Receive handlers
MessageslotSendHandler:TMessageslotSend;
|
MessageslotReceiveHandler:TMessageslotReceive;
|
MessageslotReceiveExHandler:TMessageslotReceiveEx;
|
Mailslot Send/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;
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 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 MutexCount(Mutex:TMutexHandle):LongWord;
function MutexOwner(Mutex:TMutexHandle):TThreadHandle;
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 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;
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;
Return to Unit Reference