多线程编程指南

销毁读写锁属性

pthread_rwlockattr_destroy(3C) 可用来销毁读写锁属性对象。

pthread_rwlockattr_destroy 语法

#include <pthread.h>



int pthread_rwlockattr_destroy(pthread_rwlockattr_t *attr);

在再次调用 pthread_rwlockattr_init() 重新初始化该对象之前,使用该对象所产生的影响是不确定的。实现可以导致 pthread_rwlockattr_destroy()attr 所引用的对象设置为无效值。

pthread_rwlockattr_destroy 返回值

如果成功,pthread_rwlockattr_destroy() 会返回零。否则,将返回用于指明错误的错误号。


EINVAL

描述:

attr 指定的值无效。