| Customize Help
| Save Settings

MthrInquireMp



Function Map
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
Click to summarizeValue Description
Click to summarize M_DEFAULT

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

Click to summarize 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 [optionally, in C++: a reference to a std::vector<MIL_UINT64> ]
  • MIL_INT

Specifies the address in which to write the requested information. Since the MthrInquireMp() function also returns the requested information, you can set this parameter to M_NULL.

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.

function map For inquiring about general types of thread settings
Click to summarizeInquireType Description
ResultPtr
- Possible values returned
Click to summarize 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)
Expand data type infoCollapse data type info ResultPtr extra info
Data type info: Data type: array of type MIL_UINT64 [optionally, in C++: a reference to a std::vector<MIL_UINT64> ] MORE
Click to summarize Non-zero initialized bit-mask array

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

Click to summarize 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).

Click to summarize M_CORE_AFFINITY_MASK_ARRAY_SIZE

Inquires the size of the array required to store the core affinity bit-mask. See M_CORE_AFFINITY_MASK in MthrControlMp() for more details.

The size of the array might represent a larger number of CPU cores than there are available in your computer. This is because the CPU cores might not be indexed by the operating system successively and/or are less than a multiple of 64.

(summarize)
Expand data type infoCollapse data type info ResultPtr extra info
Data type info: Data type: address of a MIL_INT
Click to summarize Value >= 1

Specifies the size of the core affinity mask array.

Click to summarize 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)
Expand data type infoCollapse data type info ResultPtr extra info
Data type info: Data type: address of a MIL_INT
Click to summarize M_DEFAULT

Specifies the default value. INFO

Click to summarize 1 <= Value <= 65535

Specifies the maximum number of CPU cores to use. INFO

Click to summarize 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)
Expand data type infoCollapse data type info ResultPtr extra info
Data type info: Data type: address of a MIL_INT
Click to summarize M_DEFAULT

Specifies the default value. INFO

Click to summarize M_FOLLOW_CORE_MAX

Specifies to use the current value of M_CORE_MAX.

Click to summarize 1 <= Value <= 65535

Specifies the maximum number of CPU cores to use. INFO

Click to summarize 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)
Expand data type infoCollapse data type info ResultPtr extra info
Data type info: Data type: address of a MIL_INT
Click to summarize Value >= 1

Specifies the number of CPU cores available.

Click to summarize 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)
Expand data type infoCollapse data type info ResultPtr extra info
Data type info: Data type: address of a MIL_INT
Click to summarize M_DEFAULT

Specifies the default value. INFO

Click to summarize M_DISABLE

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

Click to summarize M_ENABLE

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

Click to summarize M_MP_PRIORITY

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

(summarize)
Expand data type infoCollapse data type info ResultPtr extra info
Data type info: Data type: address of a MIL_INT
Click to summarize M_DEFAULT

Specifies the default value. INFO

Click to summarize M_ABOVE_NORMAL

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

Click to summarize M_BELOW_NORMAL

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

Click to summarize M_HIGHEST

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

Click to summarize M_IDLE

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

Click to summarize M_LOWEST

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

Click to summarize M_NORMAL

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

Click to summarize M_TIME_CRITICAL

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

Click to summarize 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)
Expand data type infoCollapse data type info ResultPtr extra info
Data type info: Data type: address of a MIL_INT
Click to summarize M_DEFAULT

Specifies the default value. INFO

Click to summarize M_DISABLE

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

Click to summarize 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. If the requested information does not fit into a MIL_INT, this function will return M_NULL or truncate the information.
Compilation information
Header Include mil.h.
Library Use mil.lib.
DLL Requires mil.dll, milmp.dll.
DEFAULT CORE AFFINITY MASK CORE AFFINITY MASK ARRAY SIZE 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