| MIL 10 Reference
| Customize Help
| Save Settings

MthrInquireMp



See also
Availability
Available in MIL-Lite
Available in MIL

Available on Windows
Available on Linux

Available on Non-Matrox computer
Available on Matrox 4Sight-X
Available on Matrox 4Sight GP
Available on Matrox Supersight
function map Function map
Examples
Synopsis
Inquires about a MIL multi-core processing setting of a thread context.
Syntax
MIL_INT MthrInquireMp(
MIL_ID ThrId, //in
MIL_INT64 InquireType, //in
MIL_INT64 TypeFlag, //in
MIL_INT64 TypeValue, //in
void *ResultPtr //out
)
Description

This function inquires about a MIL multi-core processing setting of a thread context. This function can return whether multi-core processing is used to execute the MIL functions on the specified thread. It can also return how multi-core processing is performed for the specified thread.

MthrInquireMp() always takes precedence over MappInquireMp().

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see if there is complementary information.
Parameters
This function is not supported on the selected boards.
Parameters
ThrId

Specifies the identifier of a user-allocated MIL thread context allocated using MthrAlloc().

function map For specifying the identifier of a user-allocated MIL thread context
CollapseValue Description
Collapse M_DEFAULT

Specifies the default MIL thread context identifier associated with the current Host thread.

Collapse MIL thread context identifier

Specifies the identifier of a user-allocated MIL thread context.

InquireType

Specifies the type of multi-core processing setting about which to inquire.

See the Parameter associations section for possible values that can be specified.

TypeFlag

Reserved for future expansion. This parameter must be set to M_DEFAULT.

TypeValue

Reserved for future expansion. This parameter must be set to M_DEFAULT.

ResultPtr
Accepts the address of one of the following (see the Parameter associations section for specifics on which is expected):
  • array of type MIL_UINT64
  • MIL_INT

Specifies the address in which to write the requested information.

See the Parameter associations section for possible values that can be returned.

The table below lists possible values for the InquireType parameter and possible values returned to the ResultPtr parameter.

Unless otherwise specified, the following values require that you pass the ResultPtr parameter the address of a MIL_INT.

function map For inquiring about general types of thread settings
CollapseInquireType Description
ResultPtr
- Possible values returned
Collapse M_CORE_AFFINITY_MASK

Inquires the core affinity bit-mask, which indicates the CPU cores that can be used to run the multi-core processing part of MIL functions.

The first element of the array represents the first 64 CPU cores. The least-significant bit of the first element represents CPU core 0. The most-significant bit of the first element represents CPU core 63. The least-significant bit of the second element represents CPU core 64 and so on. A CPU core is available if its corresponding bit is enabled (1). If its corresponding bit is disabled (0), the CPU core is not available. CPU cores always have the same indices, as long as the hardware in your computer and the operating system does not change. SET

(summarize)
Collapse ResultPtr data type info

Data type: array of type MIL_UINT64
Array size: Use M_CORE_AFFINITY_MASK_ARRAY_SIZE to determine the required size of the array.

Collapse Non-zero initialized bit-mask array

Specifies a bit-mask array in which each bit represents one CPU core. INFO

Collapse Zero-initialized bit-mask

Specifies that all CPU cores that are available to the process running your MIL application can be used (M_CORE_AFFINITY_MASK is set to M_ALL).

Collapse M_CORE_MAX

Inquires the maximum number of CPU cores to use to process the multi-core processing part of each MIL function on the specified thread. SET

(summarize)
Collapse M_DEFAULT

Specifies the default value. INFO

Collapse 1 <= Value <= 65535

Specifies the maximum number of CPU cores to use. INFO

Collapse M_CORE_MAX_FOR_COPY

Inquires the maximum number of CPU cores to use to process the multi-core processing part of copy type functions on the specified thread. SET

(summarize)
Collapse M_DEFAULT

Specifies the default value. INFO

Collapse M_FOLLOW_CORE_MAX

Specifies to use the current value of M_CORE_MAX.

Collapse 1 <= Value <= 65535

Specifies the maximum number of CPU cores to use. INFO

Collapse M_CORE_NUM_EFFECTIVE

Inquires the number of CPU cores available for executing the multi-core processing part of MIL functions on the specified thread.

(summarize)
Collapse Value >= 1

Specifies the number of CPU cores available.

Collapse M_CORE_SHARING

Inquires whether MIL multi-core processing can use multiple logical cores per physical CPU core, when hyper-threading is enabled and supported. SET

(summarize)
Collapse M_DEFAULT

Specifies the default value. INFO

Collapse M_DISABLE

Specifies only one logical core per physical CPU core, if hyper-threading is enabled.

Collapse M_ENABLE

Specifies all the logical cores of a physical CPU core, if hyper-threading is enabled.

Collapse M_MP_PRIORITY

Inquires the processing priority of the multi-core processing part of MIL functions. SET

(summarize)
Collapse M_DEFAULT

Specifies the default value. INFO

Collapse M_ABOVE_NORMAL

Specifies that the multi-core processing part of MIL functions will be executed with above normal priority.

Collapse M_BELOW_NORMAL

Specifies that the multi-core processing part of MIL functions will be executed with below normal priority.

Collapse M_HIGHEST

Specifies that the multi-core processing part of MIL functions will be executed with high priority. INFO

Collapse M_IDLE

Specifies that the multi-core processing part of MIL functions will be executed with idle priority. INFO

Collapse M_LOWEST

Specifies that the multi-core processing part of MIL functions will be executed with low priority.

Collapse M_NORMAL

Specifies that the multi-core processing part of MIL functions will be executed with normal priority.

Collapse M_TIME_CRITICAL

Specifies that the multi-core processing part of MIL functions will be executed with time critical priority. INFO

Collapse M_MP_USE

Inquires whether multi-core processing can be used to execute certain parts of MIL functions.

MappInquireMp() with M_MP_FORCED_DISABLE takes precedence over this setting. SET

(summarize)
Collapse M_DEFAULT

Specifies the default value. INFO

Collapse M_DISABLE

Specifies that multi-core processing cannot be used for MIL functions on the specified thread.

Collapse M_ENABLE

Specifies that multi-core processing can be used for MIL functions on the specified thread.

Return value
The returned value is the requested information cast to a MIL_INT, except for M_CORE_AFFINITY_MASK. In this case, the returned value is undefined.
Compilation information
Header Include mil.h.
Library Use mil.lib.
DLL Requires mil.dll, milmp.dll.
DEFAULT CORE AFFINITY MASK CORE MAX DEFAULT CORE MAX FOR COPY DEFAULT FOLLOW CORE MAX CORE NUM EFFECTIVE CORE SHARING DEFAULT DISABLE ENABLE MP PRIORITY DEFAULT ABOVE NORMAL BELOW NORMAL HIGHEST IDLE LOWEST NORMAL TIME CRITICAL MP USE DEFAULT DISABLE ENABLE