attr指定已初始化的属性对象。 pshared指定要获取和设置的读写锁属性对象的进程共享属性。 返回值 如果成功,pthread_rwlockattr_setpshared子例程将返回零。 否则,将返回错误号以指示错误。 成功完成时,pthread_rwlockattr_getpshared子例程返回零,并将进程共享属性attr的值存储到pshared参数引用的对象中。...
pthread_rwlockattr_setpshared () 函数为读或写锁定属性对象 attr设置属性 pshared。 读或写锁定属性对象允许您管理应用程序中读或写锁定的特征。 它定义在创建期间要用于读或写锁定的值集。 通过建立读或写锁属性对象,您可以创建许多具有相同特征集的读或写锁,而无需为每个读或写锁定义这些特征...
If successful, thepthread_rwlockattr_setpsharedsubroutine returns zero. Otherwise, an error number is returned to indicate the error. Upon successful completion, thepthread_rwlockattr_getpsharedsubroutine returns zero and stores the value of the process-shared attribute ofattrinto the object...