|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE concept |
|
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
|
12 <concept id="GUID-CFE0A4EB-845C-43B6-A732-AA155AFD99D6" xml:lang="en"><title>User |
|
13 Requests and Synchronisation</title><shortdesc>This document introduces user requests and synchronisation methods |
|
14 used by device drivers.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
15 <section id="GUID-B206AAEC-9750-44BB-B2FC-70613D3AEAB9"> <title>Types |
|
16 of user request</title> <p>User-side requests to a driver can be of |
|
17 three types: synchronous, asynchronous, and cancellation of an asynchronous |
|
18 request. User requests can be handled in two different ways, based on the |
|
19 logical channel model used by the device driver. A channel implementation |
|
20 is derived from either: </p> <ul> |
|
21 <li id="GUID-7FB5FD8B-A33D-5AC2-9913-F741AB04853F"><p> <xref href="GUID-E7550422-5121-3393-A85E-BB797969CD2A.dita"><apiname>DLogicalChannelBase</apiname></xref>: |
|
22 the driver developer decides how a request is handled. </p> </li> |
|
23 <li id="GUID-0E2BF6E4-4B7C-5B8D-8A56-0E7607BB53EB"><p> <xref href="GUID-A3CC1D95-4681-3349-A67C-F113A614041D.dita"><apiname>DLogicalChannel</apiname></xref>: |
|
24 this is derived from <codeph>DLogicalChannelBase</codeph>, and implements |
|
25 a basic mechanism for handling requests. </p> </li> |
|
26 </ul> <p>In the <codeph>DLogicalChannel</codeph> derived model, requests from |
|
27 user threads to the driver are queued as messages and handled sequentially |
|
28 by a single Kernel side DFC. This is the model described in this section. |
|
29 More details on the differences between the models can be found in<xref href="GUID-0956CE5E-C02B-5EEE-890A-5E8E84A8D9A1.dita">Logical |
|
30 Channel</xref> documentation. </p> <p>All requests from the user result in |
|
31 a call to a single function <xref href="GUID-E7550422-5121-3393-A85E-BB797969CD2A.dita#GUID-E7550422-5121-3393-A85E-BB797969CD2A/GUID-FD4DA73F-45E7-37BE-9380-1D8ED36114F7"><apiname>DLogicalChannelBase::Request()</apiname></xref>. |
|
32 In this function the driver determines the type of the request, i.e. synchronous, |
|
33 asynchronous, or cancel, and implements handling of the requests. </p> |
|
34 </section> |
|
35 <section id="GUID-0C209A93-7FFE-4C63-A362-A6674D941E9C"><title>Synchronisation |
|
36 methods</title><p>A driver uses the following synchronisation methods.</p><ul> |
|
37 <li>Deferred Function Calls</li> |
|
38 <li>Timers</li> |
|
39 <li>Generated Events</li> |
|
40 </ul></section> |
|
41 </conbody></concept> |