1954年属什么| 呼吸短促是什么原因| 吃什么养颜美容抗衰老| 4月19号是什么星座| 黍是什么意思| 金银花为什么叫忍冬| 猪油吃多了有什么好处和坏处| 黄瓜与什么相克| 湍急是什么意思| 威化是什么意思| plg是什么意思| 得了阴虱用什么药能除根| 棕色裤子配什么颜色上衣| 嘶哑什么意思| 白醋和小苏打一起用起什么效果| 易栓症是什么病| 勾陈是什么意思| 女生白带是什么| 什么是低聚果糖| 习惯是什么意思| 脚脖子浮肿是什么原因引起的| 坐月子吃什么水果好| 枕戈待旦什么意思| 远香近臭什么意思| 南昌有什么好玩的景点| 儿童咳嗽吃什么药管用| 结节是什么症状| 6.8是什么星座| 梦到前女友是什么意思| 降钙素是查什么的| 前列腺有什么作用| 今年流行什么发型女| 日柱金舆是什么意思| 共济失调是什么意思| 药食同源什么意思| 破屋是什么意思| 玉屏风颗粒治什么病| bbc是什么意思| 五什么六什么的成语| 三唑磷主要打什么虫| 程五行属什么| 血池是什么意思| 劳碌命是什么意思| 梦见火车脱轨什么预兆| 什么人容易得胆结石| Mo什么元素| 于心不忍是什么意思| 甘油三酯高说明什么| 血管瘤长什么样子图片| 匙仁是牛的什么部位| 过敏吃什么药| 心是什么| 岁运并临是什么意思| 三楼属于五行属什么| eb是什么| 申时属什么生肖| 福建岩茶属于什么茶| 曹操叫什么| 脖子为什么有颈纹| 吃槟榔有什么好处和坏处| vmd是什么意思| 火险痣是什么意思| tomboy是什么意思| 锰酸钾是什么颜色| berries什么意思| 强字五行属什么| 刀枪不入是什么生肖| 金骏眉是什么茶| dream car是什么意思| 低血压什么症状| 排卵期是什么时候开始算| 晚上右眼跳是什么预兆| 屁股胀痛什么原因| 小腿发麻是什么原因| 金融bp是什么意思| 7月15日是什么日子| 为什么会有脚气| 近视散光是什么意思| 念叨是什么意思| 七叶子是什么意思| 姨妈是什么意思| 688是什么意思| 难过美人关是什么生肖| 大便隐血阳性是什么意思| 梦见家里着火了是什么征兆| 内向的人适合做什么工作| blossom是什么意思| 基底是什么意思| 养殖业什么最赚钱农村| 全身骨头疼是什么原因| 烟台有什么特产| 拉屎不成形是什么原因| 平头哥是什么意思| 桂花乌龙茶属于什么茶| o3是什么| 充电头什么牌子好| 手指头脱皮是什么原因| 单飞什么意思| 人流需要准备什么| 阿修罗道是什么意思| 兔子可以吃什么蔬菜| c1e驾照能开什么车| 中药用什么锅熬效果最佳| 尿维生素c弱阳性是什么意思| 什么头什么颈| 亦或是什么意思| 红参有什么功效| 小叶苦丁茶有什么作用和功效| 马鲛鱼是什么鱼| 餐饮sop是什么意思| 什么的生活| 玛卡是什么药| 福州五行属什么| 颈椎病用什么药最好| 师弟是什么意思| 什么来什么去| 手掌红是什么原因| 月经量少要吃什么调理| 什么是无期徒刑| 绿茶什么时候喝最好| 梦见小葱是什么意思| 心功能二级是什么意思| 什么姿势| 秋田狐鱼钩适合钓什么鱼| 割包皮有什么好处和坏处| a型血与o型血生的孩子是什么血型| 干咳无痰吃什么药效果最好| 嘴干嘴苦是什么原因| 心电监护pr是什么意思| 聚焦是什么意思| 头发掉的严重是什么原因| 白带异常用什么药| 下午6点是什么时辰| 秋千为什么叫秋千| 局灶肠化是什么意思| 肾结石可以吃什么水果| 弯是什么意思| 肾结石都有什么症状| 有胃火口臭怎么办吃什么药| 缺失是什么意思| 蒂芙尼蓝是什么颜色| 哼唧是什么意思| 查肝功能挂什么科| 犬瘟是什么原因引起的| 热伤风吃什么药好得快| 滑胎是什么意思| 美莎片是什么药| 送女生礼物送什么好| 生蚝是什么东西| 1996年出生属什么| 甲状腺低是什么意思| 类风湿是什么原因引起的| 丁克夫妻是什么意思| 鱼加思读什么| 前列腺炎吃什么药最好| 11月20日什么星座| 晚上没有睡意什么原因| 假冒警察什么罪怎么判| 做包皮挂什么科| 腹部痛挂什么科| 睡觉腿抽筋是什么原因| 问羊知马是什么生肖| 左肾结石的症状是什么| 戳是什么意思| 乌灵胶囊有什么副作用| 眼睛看什么科| 三焦不通吃什么中成药| 成龙真名叫什么名字| 狮子座是什么星座| 梦到打死蛇是什么意思| 九月29号是什么星座| 阻断是什么意思| 福祸相依什么意思| 跑得最快的是什么生肖| 什么是坚果| 仓鼠能吃什么| 什么叫声母什么叫韵母| 卒中优先是什么意思| 天空像什么的比喻句| 什么样的女人性欲强| 肉字五行属什么| 小姑独处是什么意思| 辣椒含有什么维生素| 虎跟什么生肖相冲| 美的是什么牌子| m蛋白是什么| 鸡蛋和什么搭配最营养| 5.20是什么星座| 心神不定是什么生肖| 腿发热是什么原因引起的| 康熙雍正乾隆是什么关系| 老是打饱嗝是什么原因| 为什么山东人个子高| 脂膜炎是什么原因引起的| 口渴喝什么最解渴| 三岁看大七岁看老什么意思| 会考是什么意思| s.m什么意思| ada医学上是什么意思| 鲁冰花是什么花| 吃什么补性功能最快| 直女是什么意思| 什么牌子的氨糖最好| 心脏房颤吃什么药| 空调的几匹是什么意思| 偏安一隅是什么意思| 包场是什么意思| 淋巴细胞减少说明什么| 尿酸高吃什么好| 汗疱疹用什么药好| 夏天喝什么水最解渴| 香油吃多了有什么害处| 平均红细胞体积偏低是什么意思| 还记得年少时的梦吗是什么歌| 为什么人会流泪| 肛裂是什么症状| 器质性心脏病是什么意思| 噗呲是什么意思| 阴囊长白毛是什么原因| 肠胃感冒吃什么药最好| 大腿根内侧发黑是什么原因| 什么海里没有鱼| coa是什么意思| 洗手做羹汤是什么意思| 小腿前面的骨头叫什么| 右眼上眼皮跳是什么预兆| 王不见王是什么意思| 大腿麻木是什么原因| 9d是什么意思| 胎芽是什么| 疽是什么意思| 衣服38码相当于什么码| essential是什么意思| 壁虎的尾巴有什么作用| 猪肚是什么器官| cno什么意思| 吃猪腰子有什么好处和坏处| 罗锅是什么意思| 灼是什么意思| 办理身份证需要什么| 女性缓解疲劳吃什么好| 必修课是什么意思| 宫闱是什么意思| 吃什么能让奶水变多| 这个季节适合种什么菜| 出来混迟早要还的什么意思| 什么是m属性| 尿液粉红色是什么原因| 秋葵与什么菜相克| 黄豆吃多了有什么坏处| 溜溜是什么意思| 什么东东| 腿痛去医院挂什么科| 用苦良心是什么意思| 宝宝尿少是什么原因| 九朵玫瑰花代表什么意思| 猪油吃多了有什么好处和坏处| 手上的月牙代表什么意思| 头晕头重昏昏沉沉是什么原因| 无奇不有是什么意思| 端午节什么时候吃粽子| 单纯性苔藓是什么病| 年兽叫什么| 7月19号是什么星座| 百度
The Open Group Base Specifications Issue 8
IEEE Std 1003.1-2024
Copyright ? 2001-2024 The IEEE and The Open Group

NAME

thrd_join — wait for thread termination

SYNOPSIS

#include <threads.h>

int thrd_join(thrd_t
thr, int *res);

DESCRIPTION

[CX] [Option Start] The functionality described on this reference page is aligned with the ISO C standard. Any conflict between the requirements described here and the ISO C standard is unintentional. This volume of POSIX.1-2024 defers to the ISO C standard. [Option End]

The thrd_join() function shall join the thread identified by thr with the current thread by blocking until the other thread has terminated. If the parameter res is not a null pointer, thrd_join() shall store the thread's exit status in the integer pointed to by res. The termination of the other thread shall synchronize with the completion of the thrd_join() function. The application shall ensure that the thread identified by thr has not been previously detached or joined with another thread.

The results of multiple simultaneous calls to thrd_join() specifying the same target thread are undefined.

The behavior is undefined if the value specified by the thr argument to thrd_join() refers to the calling thread.

[CX] [Option Start] It is unspecified whether a zombie thread counts against {PTHREAD_THREADS_MAX}.

If thr refers to a thread that was created using pthread_create() or via a SIGEV_THREAD notification and the thread terminates, or has already terminated, by returning from its start routine, the behavior of thrd_join() is undefined. If thr refers to a thread that terminates, or has already terminated, by calling pthread_exit() or by being cancelled, the behavior of thrd_join() is undefined.

The thrd_join() function shall not be affected if the calling thread executes a signal handler during the call. [Option End]

RETURN VALUE

The thrd_join() function shall return thrd_success on success or thrd_error if the request could not be honored.

[CX] [Option Start] It is implementation-defined whether thrd_join() detects deadlock situations; if it does detect them, it shall return thrd_error when one is detected. [Option End]

ERRORS

See RETURN VALUE.


The following sections are informative.

EXAMPLES

None.

APPLICATION USAGE

None.

RATIONALE

The thrd_join() function provides a simple mechanism allowing an application to wait for a thread to terminate. After the thread terminates, the application may then choose to clean up resources that were used by the thread. For instance, after thrd_join() returns, any application-provided stack storage could be reclaimed.

The thrd_join() or thrd_detach() function should eventually be called for every thread that is created using thrd_create() so that storage associated with the thread may be reclaimed.

The thrd_join() function cannot be used to obtain the exit status of a thread that was created using pthread_create() or via a SIGEV_THREAD notification and which terminates by returning from its start routine, or of a thread that terminates by calling pthread_exit(), because such threads have a void * exit status, instead of the int that thrd_join() returns via its res argument.

The thrd_join() function cannot be used to obtain the exit status of a thread that terminates by being cancelled because it has no way to indicate that a thread was cancelled. (The pthread_join() function does this by returning a reserved void * exit status; it is not possible to reserve an int value for this purpose without introducing a conflict with the ISO C standard.) The standard developers considered adding a thrd_canceled enumeration constant that thrd_join() would return in this case. However, this return would be unexpected in code that is written to conform to the ISO C standard, and it would also not solve the problem that threads which use only ISO C <threads.h> interfaces (such as ones created by third party libraries written to conform to the ISO C standard) have no way to handle being cancelled, as the ISO C standard does not provide cancellation cleanup handlers.

The thrd_join() function is not affected by signal handlers for the reasons stated in XRAT B.2.3 Error Numbers.

FUTURE DIRECTIONS

None.

SEE ALSO

pthread_create(), pthread_exit(), pthread_join(), thrd_create(), thrd_exit()

XBD 4.15.2 Memory Synchronization, <threads.h>

CHANGE HISTORY

First released in Issue 8. Included for alignment with the ISO/IEC 9899:2018 standard.

End of informative text.

 

return to top of page

UNIX? is a registered Trademark of The Open Group.
POSIX? is a Trademark of The IEEE.
Copyright ? 2001-2024 The IEEE and The Open Group, All Rights Reserved
[ Main Index | XBD | XSH | XCU | XRAT ]

恩施有什么好玩的 提心吊胆是什么意思 自然是什么意思 尼可刹米别名叫什么 指导是什么意思
白带发黄是什么原因引起的 低压108有什么危险 有心无力是什么意思 什么是http 董事总经理是什么职位
偶尔是什么意思 血糖高能喝什么茶 为什么现在不建议输液 me是什么基团 女人梦见大蟒蛇是什么征兆
adhd是什么病 阳光灿烂是什么意思 小三阳吃什么药 出柜什么意思 qs什么意思
手足口病疫苗什么时候打hcv8jop0ns5r.cn 滑膜增厚是什么意思hcv7jop4ns8r.cn 是什么元素yanzhenzixun.com 7月31号是什么星座hcv8jop3ns2r.cn 说话鼻音重是什么原因hcv8jop3ns1r.cn
白带黄吃什么药hcv7jop9ns0r.cn 双肺索条灶是什么意思gangsutong.com rad是什么意思hcv8jop1ns2r.cn 屁股长痣代表什么hcv9jop7ns2r.cn hpv是什么hcv7jop6ns1r.cn
月经突然停止是什么原因hcv8jop4ns5r.cn 入伏天是什么意思hcv9jop4ns0r.cn 茼蒿不能和什么一起吃hcv9jop0ns0r.cn 老鼠属于什么类动物hcv7jop5ns6r.cn 鸩杀是什么意思hcv7jop6ns5r.cn
什么是隐形矫正牙齿hcv8jop1ns2r.cn av是什么hcv7jop9ns7r.cn 阴囊潮湿吃什么食物hcv8jop1ns3r.cn 瞳孔扩散意味着什么zsyouku.com 生地和熟地有什么区别hcv8jop2ns0r.cn
百度