pthread_mutex_unlock.txt

来自「Pthread lib库完整说明文档」· 文本 代码 · 共 62 行

TXT
62
字号
pthread_mutex_unlock SubroutinePurposeUnlocks a mutex.LibraryThreads Library (libpthreads.a)Syntax#include <pthread.h>int pthread_mutex_unlock (mutex)pthread_mutex_t *mutex;DescriptionThe pthread_mutex_unlock subroutine unlocks the mutex mutex. It checksthe mutex owner and resets the mutex only if the calling thread isthe mutex owner; otherwise it returns an error.Note:	The pthread.h header file must be the first included file ofeach source file using the threads library.Parametermutex	Specifies the target mutex.Return ValuesUpon successful completion, 0 is returned. Otherwise, an error codeis returned.Error CodesThe pthread_mutex_unlock subroutine is unsuccessful if the followingis true:EINVAL	The mutex parameter is not valid.EPERM	The calling thread does not own the mutex lock.Implementation SpecificsThese subroutines are part of the Base Operating System (BOS) Runtime.Related InformationThe pthread_mutex_lock or pthread_mutex_trylock subroutine.Using Mutexes.Threads Library Quick Reference.

⌨️ 快捷键说明

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