多线程编程指南

销毁互斥锁

使用 mutex_destroy(3C) 可以销毁与 mp 所指向的互斥锁相关联的任何状态。用来存储该互斥锁的空间不会释放。对于 POSIX 线程,请参见pthread_mutex_destroy 语法

mutex_destroy 语法

#include <thread.h>



int mutex_destroy (mutex_t *mp);

mutex_destroy 返回值

mutex_destroy() 在成功运行后返回 0。如果检测到以下情况,mutex_destroy() 将失败并返回对应的值。


EFAULT

描述:

mp 指向的地址非法。