a0Unlock()

Performs a blocking unlock.


Syntax

a0tError a0Unlock(
a0tLock *lock,
int count,
a0tRequest *request);

Arguments

Namerd/wrDescription
lock write Table of locks to be unlocked.
count read Number of locks to unlocked.
request write Request descriptor to hold the status.

Description

This function performs blocking unlocks for all the count elements of the table lock. The request is said to be completed when all locks are unlocked.

Every entry in the lock table must be previously prepared by the functions a0SetLockDMARegion(), a0SetLockDMARegionPart(), a0SetLockRead() and a0SetUnlockWrite().

The lock table lock must have been passed to a function like a0Lock() to set locks for the DMA regions.

On return of this function, the variable pointed by request contains an opaque request that should be used later to wait or test the completion of the lock-and-read operation.


Return Values

If an error condition occurs, it returns the error code, otherwise it returns A0ErrOk. Possible values are as follows:
Error CodeDescription
A0ErrFailSend It was not possible to send a request.
A0ErrFailReceive It was not possible to receive a reply.
A0ErrInvFormat The format has an invalid type.
A0ErrNotImplem The format has an unimplemented type.
A0ErrOkSuccessful completion.

See Also

a0FReadPartLock() a0FReadLock() a0FWriteUnlock() a0IUnlock() a0Lock() a0SetLockDMARegion() a0SetLockDMARegionPart() a0SetLockRead() a0SetUnlockWrite()