---
title: HTL_thread_cond_broadcast
description: "发送条件变量的信号给所有等待的线程。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengboostkithistory/2300/accel/kunpengaccel_ksl_16_0129.html
sourcePath: /source/zh/kunpengboostkithistory/2300/accel/kunpengaccel_ksl_16_0129.html
indexId: ed5007197745df0fbd982099651e2948b2b22dc85fc165c52b299ef3c639887174
---
# HTL_thread_cond_broadcast

发送条件变量的信号给所有等待的线程。

#### 接口定义

int HTL_thread_cond_broadcast(HTL_thread_cond_t *thread_cond);


#### 描述

HTL_thread_cond_broadcast()用于发送条件变量的信号给所有正在被条件变量thread_cond阻塞的等待者。调用者不需要持有与thread_cond关联的互斥锁。如果当前没有等待者被阻止在thread_cond上，则此函数无效。


#### 参数

| 参数名 | 类型 | 描述 | 输入/输出 |
| --- | --- | --- | --- |
| thread\_cond | HTL\_thread\_cond\_t \* | 条件变量句柄地址。 | 输入 |


#### 返回值

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


#### 示例

```
ret = HTL_thread_cond_broadcast(&cond);
```
