---
title: HTL_thread_executor_self
description: "获取正在运行调用工作单元的执行器。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengboostkithistory/2300/accel/kunpengaccel_ksl_16_0063.html
sourcePath: /source/zh/kunpengboostkithistory/2300/accel/kunpengaccel_ksl_16_0063.html
indexId: c556a9b7de19f51822925c8985dd802e3b9eb00e75d3431a98fb2a86be40d2e574
---
# 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);
```
