---
title: HTL_thread_executor_self
description: "获取正在运行调用工作单元的执行器。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengboostkithistory/252RC1/accel/kunpengaccel_ksl_16_0063.html
sourcePath: /source/zh/kunpengboostkithistory/252RC1/accel/kunpengaccel_ksl_16_0063.html
indexId: 93926c5e83d17fe878ddf43f5afa72a49e16ffdf5069b808b6812936ce7a1ef276
---
# HTL_thread_executor_self

获取正在运行调用工作单元的执行器。

#### 接口定义

int HTL_thread_executor_self(HTL_thread_executor_t *executor);


#### 描述

HTL_thread_executor_self()用于获取正在运行调用工作单元的执行器。


#### 参数

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


#### 返回值

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


#### 示例

```
HTL_thread_executor_t executor;
    HTL_thread_executor_self(&executor);
```
