NPA_MutexLock

Acquires a mutex lock to allow multiprocessor (MP) safe operations on shared data. Allows driver to sleep while waiting for the lock.

Thread Context:Blocking
Requirements:NPA_MutexAlloc must be called one time to initialize the lock before it is used.

Syntax

    LONG NPA_MutexLock (
       LONG   mutexHandle
    );
    
    

Parameters

mutexHandle
(IN) Mutex handle obtained from NPA_MutexAlloc.

Return Values

The following table lists return values and descriptions.

0x0000

Successful. Obtained the mutex.

0x1010

Invalid mutex handle.

Remarks

Obtains a mutually exclusive lock (only one thread can obtain the lock at any given time) to manipulate shared data safely in a multiprocessor environment.