📄 pthread_mutex_setprioceiling.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>pthread_mutex_setprioceiling</title></head><body bgcolor=white><center><font size=2>The Single UNIX ® Specification, Version 2<br>Copyright © 1997 The Open Group</font></center><hr size=2 noshade><h4><a name = "tag_000_007_1450"> </a>NAME</h4><blockquote>pthread_mutex_setprioceiling, pthread_mutex_getprioceiling- change the priority ceiling of a mutex(<b>REALTIME THREADS</b>)</blockquote><h4><a name = "tag_000_007_1451"> </a>SYNOPSIS</h4><blockquote><pre><code>#include <<a href="pthread.h.html">pthread.h</a>>int pthread_mutex_setprioceiling(pthread_mutex_t *<i>mutex</i>, int <i>prioceiling</i>, int *<i>old_ceiling</i>);int pthread_mutex_getprioceiling(const pthread_mutex_t *<i>mutex</i>, int *<i>prioceiling</i>);</code></pre></blockquote><h4><a name = "tag_000_007_1452"> </a>DESCRIPTION</h4><blockquote>The<i>pthread_mutex_getprioceiling()</i>function returns the current priority ceiling of the mutex.<p>The<i>pthread_mutex_setprioceiling()</i>function either locks the mutex if it is unlocked, or blocks until it cansuccessfully lock the mutex, then itchanges the mutex's priority ceiling and releases the mutex.When the change is successful, the previous value of thepriority ceiling is returned in<i>old_ceiling</i>.The process of locking the mutex need not adhereto the priority protect protocol.<p>If the<i>pthread_mutex_setprioceiling()</i>function fails, the mutex priority ceiling is not changed.</blockquote><h4><a name = "tag_000_007_1453"> </a>RETURN VALUE</h4><blockquote>If successful, the<i>pthread_mutex_setprioceiling()</i>and<i>pthread_mutex_getprioceiling()</i>functions return zero.Otherwise, an error number is returned to indicate the error.</blockquote><h4><a name = "tag_000_007_1454"> </a>ERRORS</h4><blockquote>The <i>pthread_mutex_getprioceiling()</i>and<i>pthread_mutex_setprioceiling()</i>functions will fail if:<dl compact><dt>[ENOSYS]<dd>The option _POSIX_THREAD_PRIO_PROTECT is not defined andthe implementation does not support the function.</dl><p>The<i>pthread_mutex_setprioceiling()</i>and<i>pthread_mutex_getprioceiling()</i>functions may fail if:<dl compact><dt>[EINVAL]<dd>The priority requested by<i>prioceiling</i>is out of range.<dt>[EINVAL]<dd>The value specified by<i>mutex</i>does not refer to a currently existing mutex.<dt>[ENOSYS]<dd>The implementation does not support the priority ceiling protocol for mutexes.<dt>[EPERM]<dd>The caller does not have the privilege to perform the operation.</dl></blockquote><h4><a name = "tag_000_007_1455"> </a>EXAMPLES</h4><blockquote>None.</blockquote><h4><a name = "tag_000_007_1456"> </a>APPLICATION USAGE</h4><blockquote>None.</blockquote><h4><a name = "tag_000_007_1457"> </a>FUTURE DIRECTIONS</h4><blockquote>None.</blockquote><h4><a name = "tag_000_007_1458"> </a>SEE ALSO</h4><blockquote><i><a href="pthread_mutex_init.html">pthread_mutex_init()</a></i>,<i><a href="pthread_mutex_lock.html">pthread_mutex_lock()</a></i>,<i><a href="pthread_mutex_unlock.html">pthread_mutex_unlock()</a></i>,<i><a href="pthread_mutex_trylock.html">pthread_mutex_trylock()</a></i>,<i><a href="pthread.h.html"><pthread.h></a></i>.<br></blockquote><h4>DERIVATION</h4><blockquote>Derived from the POSIX Threads Extension (1003.1c-1995)</blockquote><hr size=2 noshade><center><font size=2>UNIX ® is a registered Trademark of The Open Group.<br>Copyright © 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 + -