diff -r 4816d766a08a -r f345bda72bc4 Symbian3/PDK/Source/GUID-F367F6C9-66F7-4061-81A7-0C845D8F39C4.dita --- a/Symbian3/PDK/Source/GUID-F367F6C9-66F7-4061-81A7-0C845D8F39C4.dita Tue Mar 30 11:42:04 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-F367F6C9-66F7-4061-81A7-0C845D8F39C4.dita Tue Mar 30 11:56:28 2010 +0100 @@ -1,61 +1,61 @@ - - - - - -Cancellation -of Asynchronous RequestsThis document describes how a device driver cancels an asynchronous -request. -

Any outstanding asynchronous request can be cancelled. DoCancel() is -implemented to handle cancel requests. Cancel requests are either explicitly -made by the user or made when there is a close message. Any pending requests -and queued DFCs are cancelled and the request is completed with KErrCancel.

-/** - Cancel Asynchronous Requests. This is called from HandleMsg() to - cancel pending asynchronous requests. This function determines which - operation is to be cancelled and tidies up the resources specific to - the request being cancelled, any outstanding DFCs, and timers, and - signals the client that the operation is completed. - - @param aMask - Mask containing the request number that has to be cancelled - */ -void DExDriverLogicalChannel::DoCancel(TUint aMask) - { - ... - // Any pending asynchronous operation can be - // cancelled. Check a valid asynchronous request - // to cancel has been specified. - // - if(aMask&(1<<RExDriverChannel::ERequestTransmitData)) - { - if (iTxDataStatus) - { - // If it is a Transmit request, cancel the Transmit DFC. - // TDfc::Cancel() cancels the DFC if it is already - // queued. It does nothing if the DFC is not queued. - // - iTxDfc.Cancel(); - - // Notify the client (iClient) that the request is - // completed. The TRequestStatus object is updated with the - // status and the completion code is provided to the - // client. KErrCancel indicates that the request has been - // cancelled. Typically, a client thread, waiting on - // User::WaitForRequest(TRequestStatus &aStatus) or using - // the active object framework, is unblocked and notified. - // Then the client may read the request status from the - // TRequestStatus object. - // - Kern::RequestComplete(iClient,iTxDataStatus,KErrCancel); - } - } - ... - } + + + + + +Cancellation +of Asynchronous RequestsThis document describes how a device driver cancels an asynchronous +request. +

Any outstanding asynchronous request can be cancelled. DoCancel() is +implemented to handle cancel requests. Cancel requests are either explicitly +made by the user or made when there is a close message. Any pending requests +and queued DFCs are cancelled and the request is completed with KErrCancel.

+/** + Cancel Asynchronous Requests. This is called from HandleMsg() to + cancel pending asynchronous requests. This function determines which + operation is to be cancelled and tidies up the resources specific to + the request being cancelled, any outstanding DFCs, and timers, and + signals the client that the operation is completed. + + @param aMask + Mask containing the request number that has to be cancelled + */ +void DExDriverLogicalChannel::DoCancel(TUint aMask) + { + ... + // Any pending asynchronous operation can be + // cancelled. Check a valid asynchronous request + // to cancel has been specified. + // + if(aMask&(1<<RExDriverChannel::ERequestTransmitData)) + { + if (iTxDataStatus) + { + // If it is a Transmit request, cancel the Transmit DFC. + // TDfc::Cancel() cancels the DFC if it is already + // queued. It does nothing if the DFC is not queued. + // + iTxDfc.Cancel(); + + // Notify the client (iClient) that the request is + // completed. The TRequestStatus object is updated with the + // status and the completion code is provided to the + // client. KErrCancel indicates that the request has been + // cancelled. Typically, a client thread, waiting on + // User::WaitForRequest(TRequestStatus &aStatus) or using + // the active object framework, is unblocked and notified. + // Then the client may read the request status from the + // TRequestStatus object. + // + Kern::RequestComplete(iClient,iTxDataStatus,KErrCancel); + } + } + ... + }
\ No newline at end of file