pthread_mutexattr_getprotocol.txt
字号:
pthread_mutexattr_getprotocol SubroutinePurposeReturns the value of the protocol attribute of a mutex attributesobject.LibraryThreads Library (libpthreads.a)Syntax#include <pthread.h>int pthread_mutexattr_getprotocol (attr, protocol)const pthread_mutexattr_t *attr;int *protocol;DescriptionThe pthread_mutexattr_getprotocol subroutine returns the value ofthe protocol attribute of the mutex attributes object attr. This attributespecifies the protocol used to prevent priority inversions for themutex created with this attributes object. It may have one of thefollowing values:PTHREAD_PRIO_NONE Denotes no protocol. This is the default value.PTHREAD_PRIO_INHERIT Denotes priority inheritance protocol. It isonly available if the _POSIX_THREAD_PRIO_INHERIT symbol is defined.Otherwise, it is not supported.PTHREAD_PRIO_PROTECT Denotes priority protection protocol. It is onlyavailable if the _POSIX_THREAD_PRIO_PROTECT symbol is defined. Otherwise,it is not supported.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.protocol Points to where the protocol attribute value will be storedReturn ValuesUpon successful completion, the value of the protocol attribute isreturned via the protocol parameter, and 0 is returned. Otherwise,an error code is returned.Error CodesThe pthread_mutexattr_getprotocol subroutine is unsuccessful if thefollowing is true:EINVAL The attr parameter is not valid.ENOSYS Both priority inheritance and priority protection POSIX optionsare 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 priorityinheritance or priority protection POSIX option. Both priority inheritanceand priority protection POSIX options are not implemented in the currentversion of AIX.Related InformationThe pthread_mutexattr_setprotocol subroutine, pthread_mutexattr_initsubroutine.Synchronization Scheduling.Threads Library Options and Threads Library Quick Reference.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -