Important: The information in this document is obsolete and should not be used for new development.
OTAcquireLock
Acquires a lock and marks the beginning of a critical section.C INTERFACE
Boolean OTAcquireLock (OTLock* lockPtr)C++ INTERFACE
None. C++ applications use the C interface to this function.PARAMETERS
lockPtr
- A pointer to a lock used to identify this section.
- function result
- Returns
true
if the lock is acquired.DISCUSSION
This function attempts to acquire the lock referenced by thelockPtr
parameter. If successful,true
is returned. If not, then some other thread is holding the lock, andfalse
is returned.Use the
OTClearLock
function to clear a lock aquired with theOTAcquireLock
function and to mark the end of a critical section.