CmtGetCurrentThreadPriority
- Updated2023-02-21
- 1 minute(s) read
CmtGetCurrentThreadPriority
int CmtGetCurrentThreadPriority (int *priority);
Purpose
Gets the priority of the current thread.
(Linux) This function is not supported.
Parameters
Output | ||||||||||||||||||
Name | Type | Description | ||||||||||||||||
priority | int |
The priority of the current thread. On Windows, this priority value in combination with the priority class of the processpriority class of the process determines the base priority level of the thread. The operating system uses this base priority level to schedule threads on the CPU. You can set the priority class of a process with the Windows SDK function SetPriorityClass. The thread priority value can be one of the following:
(RT) On real-time systems the thread priority can be any value from -15 to 15. The default priority of a thread in the system is 0. The operating system scheduler runs at priority level 9. Any threads running at a priority level equal to or higher than 9 are not subject to timeslicing by the scheduler and will run until they yield the CPU or are preempted by a higher priority thread. |
Return Value
Name | Type | Description |
cmtStatus | int | The CmtStatus code that the function call returns. This function returns 0 to indicate success and negative values to indicate failure. Pass the CmtStatus code to CmtGetErrorMessage to get a description of the error code. |
Additional Information
Library: Utility Library
Include file: utility.h
LabWindows/CVI compatibility: LabWindows/CVI 9.0 and later