FairCom Corporation


F.80 ctThrdSemapTry


Try once to get one unit of a semaphore.

Short Name

ctThrdSemapTry

TYPE

Threading function

DECLARATION

NINT ctThrdSemapTry(pctSEMAP semap)

DESCRIPTION

Same as ctThrdSemapGet except that if no unit of the semaphore is available, ctThrdSemapTry returns NTIM_ERR.

RETURN

Value
Symbolic Constant
Explanation
0
NO_ERROR
Successful function.
90
NQUE_ERR
Invalid qid.
156
NTIM_ERR
block in use by another thread. Timeout error.
514
CQUE_ERR
Queue could not be closed.
636
TSYF_ERR
block get failed.
638
TQUE_ERR
Queue message truncated to fit.

See Appendix A "c-tree Plus Error Codes" of the c-tree Plus Programmer's Reference Guide for a complete listing of valid c-tree Plus error values.

LIMITATIONS

Can only be used with a ctThrd library.

SEE ALSO

ctThrdSemapCls, ctThrdSemapGet, ctThrdSemapInit, and ctThrdSemapRel.


FairCom Corporation
www.faircom.com