ctThrdMutexRel
Releases a mutex.
Short Name
ctThrdMutexRel()
Type
Threading function
Declaration
NINT ctThrdMutexRel(pctMUTEX mutex)
Description
Releases the mutex pointed to by mutex, permitting other threads to contend for it.
Return
Value |
Symbolic Constant |
Explanation |
---|---|---|
0 |
NO_ERROR |
Successful function. |
637 |
TSYR_ERR |
mutex release failed. Check sysiocod for system-level error return. |
See FairCom DB Error Codes for a complete listing of valid FairCom DB error values.
Example
pctMUTEX tfin_mtx;
NINT rc;
ctThrdMutexGet(&tfin_mtx);
rc = tfin;
ctThrdMutexRel(&tfin_mtx);
Limitations
Can only release a mutex currently held by this thread. Can only be used with a ctThrd library.
See also
ctThrdMutexGet, ctThrdMutexTry