The C++ API for an epicsMutex.
More...
#include <epicsMutex.h>
|
|
| epicsMutex () |
| | Create a mutual exclusion semaphore.
|
| |
| | epicsMutex (const char *pFileName, int lineno) |
| | Create a mutual exclusion semaphore with source location. More...
|
| |
|
| ~epicsMutex () |
| | Delete the semaphore and its resources.
|
| |
| void | show (unsigned level) const |
| | Display information about the semaphore. More...
|
| |
| void | lock () |
| | Claim the semaphore, waiting until it's free if currently owned owned by a different thread. More...
|
| |
| void | unlock () |
| | Release the semaphore. More...
|
| |
| bool | tryLock () |
| | Similar to lock() except that the call returns immediately if the semaphore is currently owned by another thread, giving the value false. More...
|
| |
Definition at line 69 of file epicsMutex.h.
◆ epicsMutex()
| epicsMutex::epicsMutex |
( |
const char * |
pFileName, |
|
|
int |
lineno |
|
) |
| |
- Note
- The newEpicsMutex macro simplifies using this constructor.
- Parameters
-
| *pFileName | Source file name. |
| lineno | Source line number |
◆ show()
| void epicsMutex::show |
( |
unsigned |
level | ) |
const |
- Note
- Results are architecture dependant.
- Parameters
-
| level | Desired information level to report |
◆ lock()
| void epicsMutex::lock |
( |
| ) |
|
This call blocks until the calling thread can get exclusive access to the semaphore.
- Note
- After a successful lock(), additional recursive locks may be issued by the same thread, but each must have an associated unlock().
◆ unlock()
| void epicsMutex::unlock |
( |
| ) |
|
- Note
- If a thread issues recursive locks, it must call unlock() as many times as it calls lock().
◆ tryLock()
| bool epicsMutex::tryLock |
( |
| ) |
|
- Returns
- True if the resource is now owned by the caller.
-
False if some other thread already owns the resource.
The documentation for this class was generated from the following file: