Sets a part of a DMA region to be locked.
a0tError a0SetLockDMARegionPart( | | | |
| a0tLock | *lock, | |
| int | index, | |
| a0tDMARegion | *region, | |
| int | first, | |
| int | count);
| |
Name | rd/wr | Description |
lock | write | Lock descriptor table to be set. |
index | read | Index in the table. |
region | read | DMA region to be locked. |
first | read | First element of the DMA region to lock. |
count | read | Number of elements to lock. |
This function sets the the count elements of the DMA region region, starting at element first, to be locked by the lock lock[index] in the next call to a0Lock() or a0ILock().
Lock descriptors are necessary when locking several regions together. The user must set a table of lock descriptors and pass all them to a lock function. The lock function will sort all the regions and lock all them in order. This helps to prevent deadlocks, as all locks are set in the same order.
On return of this function, the variable pointed by lock contains a lock descriptor for the given region.
Error Code | Description |
A0ErrOkSuccessful completion. | |
a0SetLockDMARegion() a0SetLockRead() a0SetUnlockWrite() a0Lock() a0Unlock()