HTL_thread_executor_set_cpubind
Binds an executor to the target CPU.
Interface Definition
int HTL_thread_executor_set_cpubind(HTL_thread_executor_t executor, int cpuid);
Description
HTL_thread_executor_set_cpubind() binds an executor to a CPU ID (processor index).
Parameters
Parameter |
Type |
Description |
Input/Output |
|---|---|---|---|
executor |
HTL_thread_executor_t |
Handle to the executor. |
Input |
cpuid |
int |
CPU ID. |
Input |
Return Value
- HTL_THREAD_SUCCESS: success.
- Other values: failure. For details, see the error code descriptions.
Example
1 2 | new_cpuid = (cpuid + 1) % num_executors; ret = HTL_thread_executor_set_cpubind(executor, new_cpuid); |
Parent topic: Executor Functions