This 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().
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.