📄 pthread_mutexattr_setprioceiling.txt
字号:
pthread_mutexattr_setprioceiling SubroutinePurposeSets the value of the prioceiling attribute of a mutex attributesobject.LibraryThreads Library (libpthreads.a)Syntax#include <pthread.h>int pthread_mutexattr_setprioceiling (attr, prioceiling)pthread_mutexattr_t *attr;int prioceiling;DescriptionThe pthread_mutexattr_setprioceiling subroutine sets the value ofthe prioceiling attribute of the mutex attributes object attr. Thisattribute specifies the priority ceiling of the mutex created withthis attributes object, used in the priority protection protocol toprevent priority inversions. It has no meaning if the mutex uses anotherprotocol.Note: The pthread.h header file must be the first included file ofeach source file using the threads library.Parametersattr Specifies the mutex attributes object.prioceiling Specifies the priority ceiling to set. It must be in therange from 1 to 127, where 1 is the least favored priority, and 127the most favored; it should be the priority of the highest prioritythread that can lock the mutex lock, or higher. Setting a lower valuemay cause priority inversions.Return ValuesUpon successful completion, 0 is returned. Otherwise, an error codeis returned.Error CodesThe pthread_mutexattr_setprioceiling subroutine is unsuccessful ifthe following is true:EINVAL The attr or prioceiling parameters are not valid.ENOSYS The priority protection POSIX option is not implemented.EPERM The calling thread does not have sufficient privilege to performthe operation.Implementation SpecificsThis subroutine is part of the Base Operating System (BOS) Runtime.The implementation of this subroutine is dependent on the priorityprotection POSIX option. The priority protection POSIX option is notimplemented in the current version of AIX.Related InformationThe pthread_mutexattr_getprioceiling subroutine, pthread_mutexattr_initsubroutine, pthread_mutex_init subroutine, pthread_mutex_setprioceilingsubroutine.Synchronization Scheduling.Threads Library Options and Threads Library Quick Reference.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -