pthread_mutexattr_getpshared.txt
来自「Pthread lib库完整说明文档」· 文本 代码 · 共 84 行
TXT
84 行
pthread_mutexattr_getpshared SubroutinePurposeReturns the value of the process-shared attribute of a mutex attributesobject.Note: This subroutine is not implemented in AIX. It always returnsENOSYS.LibraryThreads Library (libpthreads.a)Syntax#include <pthread.h>int pthread_mutexattr_getpshared (attr, pshared)const pthread_mutexattr_t *attr;int *pshared;DescriptionThe pthread_mutexattr_getpshared subroutine returns the value of theprocess-shared attribute of the mutex attributes object attr. Thisattribute specifies the process sharing of the mutex created withthis attributes object. It may have one of the following values:PTHREAD_PROCESS_SHARED Specifies that the mutex can be used by anythread that has access to the memory where it is allocated, even ifthese threads belong to different processes.PTHREAD_PROCESS_PRIVATE Specifies that the mutex shall only be usedby threads within the same process as the thread that created it.This is the default value.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.pshared Points to where the pshared attribute value will be stored.Return ValuesUpon successful completion, the value of the pshared attribute isreturned via the pshared parameter, and 0 is returned. Otherwise,an error code is returned.Error CodesThe pthread_mutexattr_getpshared subroutine is unsuccessful if thefollowing is true:EINVAL The attr parameter is not valid.ENOSYS The process sharing POSIX option is not implemented.Implementation SpecificsThis subroutine is part of the Base Operating System (BOS) Runtime.The implementation of this subroutine is dependent on the processsharing POSIX option. The process sharing POSIX option is not implementedin AIX.Related InformationThe pthread_mutexattr_setpshared subroutine, pthread_mutexattr_initsubroutine.Advanced Attributes.Threads Library Options and Threads Library Quick Reference.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?