diff -r 578be2adaf3e -r 307f4279f433 Adaptation/GUID-F7249C66-B62F-45DF-B733-BC6D5FCDA003.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Adaptation/GUID-F7249C66-B62F-45DF-B733-BC6D5FCDA003.dita Fri Oct 15 14:32:18 2010 +0100 @@ -0,0 +1,33 @@ + + + + + +Completion and NotificationThis document describes how a device driver notifies completion +of an asynchronous request. +

On completion of the request, the driver calls Kern::RequestComplete(), +passing the TRequestStatus object and completion error code, +to notify the request completion to the user. This API internally sets the +passed error code in the TRequestStatus object. It also signals +the client's thread semaphore.

+void DExDriverLogicalChannel::DoTxDataComplete() + { + ... + // 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. Typically, the client + // thread, waiting using User::WaitForRequest(TRequestStatus + // &aStatus) or the active object framework, is unblocked and + // notified. Then the client may read the request status from the + // TRequestStatus object. + // + Kern::RequestComplete(iClient,iTxDataStatus,iTxResult); + } +

The user retrieves the result of the request by calling TRequestStaus::Int().

+
\ No newline at end of file