---
title: HTL_thread_get_args
description: "获取线程参数。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengboostkithistory/2300/accel/kunpengaccel_ksl_16_0097.html
sourcePath: /source/zh/kunpengboostkithistory/2300/accel/kunpengaccel_ksl_16_0097.html
indexId: b563a6e38a6cd8f7d202ebdf383eacf189adb7a7c17e5f5cc44b5f851063e1a974
---
# HTL_thread_get_args

获取线程参数。

#### 接口定义

int HTL_thread_get_args(HTL_thread_t thread, void **thread_args);


#### 描述

HTL_thread_get_args()用于获取线程thread的运行函数的参数，通过参数thread_args返回运行函数的参数。


#### 参数

| 参数名 | 类型 | 描述 | 输入/输出 |
| --- | --- | --- | --- |
| thread | HTL\_thread\_t | 线程句柄。 | 输入 |
| thread\_args | void \*\* | 运行函数的参数。 | 输出 |


#### 返回值

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


#### 示例

```
HTL_thread_t self;
void *ret_arg = NULL;
self = HTL_thread_self();ret = HTL_thread_get_args(self, &ret_arg);
```
