Sets a DMA region to be locked.
a0tError a0SetLockDMARegion( | | | |
| a0tLock | *lock, | |
| int | index, | |
| a0tDMARegion | *region);
| |
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. |
This function sets the DMA region region 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. | |
a0SetLockDMARegionPart() a0SetLockRead() a0SetUnlockWrite() a0Lock() a0Unlock()