线程支持库 如果编译器定义宏常量__STDC_NO_THREADS__(C11),则不会提供头文件<threads.h>和此处列出的所有名称。
thrd_yield 在头文件<threads.h>中定义voidthrd_yield();(自C11以来) 向实现提供一个提示,以重新调度线程的执行,从而允许其他线程运行。 参数 (无).
thread_local 在头文件<threads.h>中定义#definethread_local_Thread_local(自C11以来) 便捷宏,可用于指定对象具有线程本地存储持续时间。
thrd_current 在头文件<threads.h>中定义thrd_tthrd_current(void);(自C11以来) 返回调用线程的标识符。 参数 (无).
mtx_destroy 在头文件<threads.h>中定义voidmtx_destroy(mtx_t*mutex);(自C11以来) 销毁mux指向的互斥锁。
cnd_destroy 在头文件<threads.h>中定义voidcnd_destroy(cnd_t*cond);(自C11以来) 销毁由cond指向的条件变量。
thrd_equal 在头文件<threads.h>中定义intthrd_equal(thrd_tlhs,thrd_trhs);(自C11以来) 检查lhs与rhs引用的是否为同一个线程。
thrd_detach 在头文件<threads.h>中定义intthrd_detach(thrd_tthr);(自C11以来) 从当前环境中分离thr标识的线程。
cnd_broadcast 在头文件<threads.h>中定义intcnd_broadcast(cnd_t*cond);(自C11以来) 解除当前等待cond指向的条件变量的所有线程。
cnd_init 在头文件<threads.h>中定义intcnd_init(cnd_t*cond);(自C11以来) 初始化新的条件变量。cond指向的对象将被设置为标识条件变量的值。
cnd_signal 在头文件<threads.h>中定义intcnd_signal(cnd_t*cond);(自C11以来) 解除当前在cond指向的条件变量上等待的一个线程。

扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2026 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059
粤公网安备44030502008569号
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号
