⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wymutex.3wy

📁 一个不错
💻 3WY
字号:
.\".\" Edited by I.J.Wang, 2004.\".TH WyMutex 3wy "libwy v0.31".SH NAMEWyMutex \- class of mutual exclusive device.SH SYNOPSIS.B #include <wymutex.h>.PPWyMutex is the class for serializing threads execution.Note: WyMutex object should be constructed after all the access      protected objects had constructed..SH "PUBLIC MEMBERS" class \fBReply\fP : public WyRet enum MutexType { \fBFast\fP, \fBErrorCheck\fP, \fBRecursive\fP } \fBWyMutex\fP(MutexType=Fast) throw(Reply) \fB~WyMutex\fP() throw() WyRet \fBlock\fP(void) throw() WyRet \fBtrylock\fP(void) throw() WyRet \fBunlock\fP(void) throw() static void \fBlock\fP(WyMutex&) throw(Reply) static void \fBtrylock\fP(WyMutex&) throw(Reply) static void \fBunlock\fP(WyMutex&) throw(Reply).SH "DESCRIPTION".\"--------------------------------------------.PP.BI "class Reply : public WyRet".PP    Class specific throw type.\"--------------------------------------------.PP.BI "enum MutexType { " "Fast" ", " "ErrorCheck" ", " "Recursive" " };"    Enumeration of the mutex type.PP     [\fBRefer\fP] ::pthread_mutex_init.PP.\"--------------------------------------------.BI "WyMutex(MutexType " "t" "=Fast) throw(Reply)".PP    Construct object of type \fIt\fP mutex in unlocked state.PP    [\fBThrow\fP] Reply            (reserved).PP     [\fBRefer\fP] ::pthread_mutex_init.\"--------------------------------------------.PP.BI "~WyMutex() throw()".PP    Destruct *this.PP    [\fBRefer\fP] ::pthread_mutex_destroy.\"--------------------------------------------.PP.BI "WyRet lock(void) throw()".PP    Lock(own) the mutex.     Thread cancellation in the serialized codes leaves    the mutex in locked state. Refer to \fBWyLock\fP..PP     [\fBRet\fP] Ok               Succeed          Wym_EDEADLK      (\fBErrorCheck\fP type of mutex only)                           \fImtx\fP already locked by the calling thread.PP     [\fBRefer\fP] ::pthread_mutex_lock.\"--------------------------------------------.PP.BI "WyRet trylock(void) throw()".PP    Try to lock the mutex..PP     [\fBRet\fP] Ok               Succeed          Wym_EBUSY        *this is locked.PP     [\fBRefer\fP] ::pthread_mutex_trylock.\"--------------------------------------------.PP.BI "WyRet unlock(void) throw()".PP    Unlock the mutex. The mutex is assumed locked by the same calling    thread..PP     [\fBRet\fP] Ok               Succeed          Wym_EPERM        (\fBErrorCheck\fP type of mutex only)                           The calling thread dose not own the mutex.PP     [\fBRefer\fP] ::pthread_mutex_unlock.\"--------------------------------------------.PP.BI "static void lock(WyMutex& " "mtx" ") throw(Reply)".PP    Static form of lock().PP     [\fBThrow\fP] Reply            Wym_EDEADLK      (\fBErrorCheck\fP type of mutex only)                             \fImtx\fP already locked by the calling thread.PP     [\fBRefer\fP] ::pthread_mutex_lock.\"--------------------------------------------.PP.BI "static void trylock(WyMutex& " "mtx" ") throw(Reply)".PP    Static form of trylock().PP     [\fBThrow\fP] Reply            Wym_EBUSY        *this is locked.PP     [\fBRefer\fP] ::pthread_mutex_trylock.\"--------------------------------------------.PP.BI "static void unlock(WyMutex& " "mtx" ") throw(Reply)".PP    Static form of unlock().PP     [\fBThrow\fP] Reply            Wym_EPERM        (\fBErrorCheck\fP type of mutex only)                             The calling thread dose not own the mutex.PP     [\fBRefer\fP] ::pthread_mutex_unlock.\"--------------------------------------------.SH "SEE ALSO".BR wyret.BR wyreply.BR wylock.BR wycond.BR wyonce.BR wytimespec.BR wy_thread.SH NOTEExcept added by this library, replys are converted from the errno an underlying C library function returned. Report of such replysare brief from Linux Programmer's Manual. See the associated man pagefor details.Project is in development, http://sourceforge.net/projects/libwx

⌨️ 快捷键说明

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