HTL_thread_executor_get_cpubind
Obtains the CPU bound to a specified executor.
Interface Definition
int HTL_thread_executor_get_cpubind(HTL_thread_executor_t executor, int *cpuid);
Description
HTL_thread_executor_get_cpubind() returns the ID of the CPU bound to the executor. If the executor is bound to multiple CPUs, one of the CPU IDs is returned.
Parameters
Parameter |
Type |
Description |
Input/Output |
|---|---|---|---|
executor |
HTL_thread_executor_t |
Handle to the executor. |
Input |
cpuid |
int * |
CPU ID. |
Output |
Return Value
- HTL_THREAD_SUCCESS: success.
- Other values: failure. For details, see the error code descriptions.
Example
int cpuid = -1;
HTL_thread_executor_t executor;
ret = HTL_thread_executor_self(&executor);
ret = HTL_thread_executor_get_cpubind(executor, &cpuid);
Parent topic: Executor Functions