⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pthread_rwlockattr_init.html

📁 unix 下的C开发手册,还用详细的例程。
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>pthread_rwlockattr_init</title></head><body bgcolor=white><center><font size=2>The Single UNIX &reg; Specification, Version 2<br>Copyright &copy; 1997 The Open Group</font></center><hr size=2 noshade><h4><a name = "tag_000_007_1657">&nbsp;</a>NAME</h4><blockquote>pthread_rwlockattr_init, pthread_rwlockattr_destroy- initialise and destroy read-write lock attributes object</blockquote><h4><a name = "tag_000_007_1658">&nbsp;</a>SYNOPSIS</h4><blockquote><pre><code>#include &lt;<a href="pthread.h.html">pthread.h</a>&gt;int pthread_rwlockattr_init(pthread_rwlockattr_t <i>*attr</i>);int pthread_rwlockattr_destroy(pthread_rwlockattr_t <i>*attr</i>);</code></pre></blockquote><h4><a name = "tag_000_007_1659">&nbsp;</a>DESCRIPTION</h4><blockquote>The function <i>pthread_rwlockattr_init()</i>initialises a read-writelock attributes object <i>attr</i> with the defaultvalue for all of the attributes defined by the implementation.<p>Results are undefined if <i>pthread_rwlockattr_init()</i>is calledspecifying an already initialised read-write lockattributes object.<p>After a read-write lock attributes object has been used toinitialise one or more read-write locks, any functionaffecting the attributes object (including destruction) does notaffect any previously initialised read-write locks.<p>The <i>pthread_rwlockattr_destroy()</i>function destroys a read-writelock attributes object. The effect ofsubsequent use of the object is undefined until the object isre-initialised by another call to<i>pthread_rwlockattr_init()</i>.An implementation may cause<i>pthread_rwlockattr_destroy()</i>to set the objectreferenced by attr to an invalid value.</blockquote><h4><a name = "tag_000_007_1660">&nbsp;</a>RETURN VALUE</h4><blockquote>If successful, the <i>pthread_rwlockattr_init()</i>and<i>pthread_rwlockattr_destroy()</i>functions return zero.Otherwise, an error number is returned toindicate the error.</blockquote><h4><a name = "tag_000_007_1661">&nbsp;</a>ERRORS</h4><blockquote>The<i>pthread_rwlockattr_init()</i>function will fail if:<dl compact><dt>[ENOMEM]<dd>Insufficient memory exists to initialise the read-writelock attributes object.</dl><p>The<i>pthread_rwlockattr_destroy()</i>function may fail if:<dl compact><dt>[EINVAL]<dd>The value specified by <i>attr</i> is invalid.</dl></blockquote><h4><a name = "tag_000_007_1662">&nbsp;</a>EXAMPLES</h4><blockquote>None.</blockquote><h4><a name = "tag_000_007_1663">&nbsp;</a>APPLICATION USAGE</h4><blockquote>Similar functions are being developed by IEEE PASC.In keeping with its objective of ensuring that CAESpecifications are fully aligned with formal standards, The Open Groupintends to add any new interfaces adopted by an official IEEE standardin this area.</blockquote><h4><a name = "tag_000_007_1664">&nbsp;</a>FUTURE DIRECTIONS</h4><blockquote>None.</blockquote><h4><a name = "tag_000_007_1665">&nbsp;</a>SEE ALSO</h4><blockquote><i><a href="pthread.h.html">&lt;pthread.h&gt;</a></i>,<i><a href="pthread_rwlock_init.html">pthread_rwlock_init()</a></i>,<i><a href="pthread_rwlock_unlock.html">pthread_rwlock_unlock()</a></i>,<i><a href="pthread_rwlock_wrlock.html">pthread_rwlock_wrlock()</a></i>,<i><a href="pthread_rwlock_rdlock.html">pthread_rwlock_rdlock()</a></i>,<i><a href="pthread_rwlockattr_getpshared.html">pthread_rwlockattr_getpshared()</a></i>.</blockquote><hr size=2 noshade><center><font size=2>UNIX &reg; is a registered Trademark of The Open Group.<br>Copyright &copy; 1997 The Open Group<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]</font></center><hr size=2 noshade></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -