Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Networking With Open Transport / Part 2 - Open Transport Reference
Chapter 27 - Utilities Reference / Functions
Locking Functions /


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 the lockPtr parameter. If successful, true is returned. If not, then some other thread is holding the lock, and false is returned.

Use the OTClearLock function to clear a lock aquired with the OTAcquireLock function and to mark the end of a critical section.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 JAN 1998