ReleaseMapping method releases a mapping that was obtained by a previous call to IPortWavePciStream::GetMapping.
NTSTATUS ReleaseMapping( [in] PVOID Tag );
Specifies a tag value identifying the mapping that is to be released. For more information, see the following Remarks section.
ReleaseMapping returns STATUS_SUCCESS if the call was successful. Otherwise, the method returns an appropriate error code.
Set the Tag parameter to the same tag value that you used to identify the mapping in the call to IPortWavePciStream::GetMapping that originally obtained the mapping.
The miniport driver must keep track of the order in which it acquires its mappings from calls to IPortWavePciStream::GetMapping, and it must release the mappings in the same order.
To avoid potential deadlocks, the miniport driver must avoid holding a spin lock during its call to
ReleaseMapping. See the ac97 sample audio driver in the Microsoft Windows Driver Kit (WDK) for a code example that uses a spin lock to serialize accesses to shared data structures and peripherals in a multiprocessor system. The sample code calls KeReleaseSpinLock before calling
ReleaseMapping and calls KeAcquireSpinLock after calling
ReleaseMapping. Between the calls to release and acquire the spin lock, the driver thread must not assume that it has exclusive access to the data or peripherals that are guarded by the spin lock. The Driver Verifier tool (see the description of this tool at the Driver Verifier website) checks for active spin locks during calls to
ReleaseMapping; if it detects one, it generates a 0xC4 (deadlock detection) bug check.
|Header||portcls.h (include Portcls.h)|