---
title: HTL_thread_getthreadid_np
description: "获取当前线程的ID。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengboostkithistory/240RC2/accel/kunpengaccel_ksl_16_0101.html
sourcePath: /source/zh/kunpengboostkithistory/240RC2/accel/kunpengaccel_ksl_16_0101.html
indexId: eac5a1fe411efa149b41720c346c66d9e9d18001ada8b56af1c32976c4dfb0d176
---
# HTL_thread_getthreadid_np

获取当前线程的ID。

#### 接口定义

int HTL_thread_getthreadid_np(void);


#### 描述

HTL_thread_getthreadid_np()用于获取当前线程的ID。


#### 参数

不涉及。


#### 返回值

线程ID。


#### 示例

```
int id;
id = HTL_thread_getthreadid_np();
```
