Clarify what the lockfunc is used for. When it will be called and

when it won't be called.  The old wording was correct, but not
sufficiently specific to understand when and how it would be called.
The new wording describes the current implementation's usage (which
should be updated if other appropriate times are decided upon),
specifically that it is called only when the load operation is
deferred to keep the locking state consistent.  When the operation
isn't deferred, the calling routine is assumed to have a coherent
locking world.

Reviewed by: scottl
This commit is contained in:
Warner Losh 2004-08-24 23:09:57 +00:00
parent 3b28ee84a6
commit 4d855643d1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=134278

View File

@ -267,6 +267,14 @@ and write operations.
Client specified lock/mutex manipulation method.
This will be called from
within busdma whenever a client lock needs to be manipulated.
In its current form, the function will be called immediately before
the callback for a dma load operation that has been deferred with
.Dv BUS_DMA_LOCK
and immediately after with
.Dv BUS_DMA_UNLOCK .
If the load operation does not need to be deferred, then it
will not be called since the function loading the map should
be holding the appropriate locks.
This method is of the format:
.Bl -tag -width compact
.It Ft void