# HTL_thread_executor_get_cpubind

获取执行器绑定的目标CPU。

#### 接口定义

int HTL_thread_executor_get_cpubind(HTL_thread_executor_t executor, int *cpuid);


#### 描述

HTL_thread_executor_get_cpubind()返回执行器绑定目标CPU的CPU ID，若执行器绑定多个CPU，CPU ID将返回其中一个。


#### 参数

| 参数名 | 类型 | 描述 | 输入/输出 |
| --- | --- | --- | --- |
| executor | HTL\_thread\_executor\_t | 执行器句柄。 | 输入 |
| cpuid | int \* | CPU ID。 | 输出 |


#### 返回值

- HTL_THREAD_SUCCESS：成功。
- 其他：失败。见错误码定义。


#### 示例

```
int cpuid = -1;
    HTL_thread_executor_t executor;
    ret = HTL_thread_executor_self(&executor);    
    ret = HTL_thread_executor_get_cpubind(executor, &cpuid);
```
