Symbian3/SDK/Source/GUID-3631971E-424B-5B10-B44C-98FB7C265843.dita
changeset 0 89d6a7a84779
equal deleted inserted replaced
-1:000000000000 0:89d6a7a84779
       
     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-3631971E-424B-5B10-B44C-98FB7C265843" xml:lang="en"><title>Kernel
       
    13 services</title><shortdesc>Describes asynchronous services provided by the kernel.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    14 <p>Many asynchronous services are provided to user threads by the kernel.</p>
       
    15 <p>The <codeph>RTimer</codeph> class is an example. It includes functions
       
    16 such as:</p>
       
    17 <codeblock id="GUID-9BF774FC-9DA2-5426-A4C5-F6A9DCB7E889" xml:space="preserve">After(TRequestStatus &amp;aStatus,TTimeIntervalMicroSeconds32 anInterval);</codeblock>
       
    18 <p>This makes a timer request that completes after a given number of microseconds.</p>
       
    19 <p>The <codeph>RTimer</codeph> class is a client-side handle to the kernel’s
       
    20 timer service. When an <codeph>RTimer</codeph> is opened, using its <codeph>CreateLocal()</codeph> function,
       
    21 a Kernel object is created which holds the state of the timer and the ID of
       
    22 the client’s thread. When a request function is issued, the client-side handle:</p>
       
    23 <ul>
       
    24 <li id="GUID-D7D4F444-C1CB-5FEA-B885-FDC6764CE093"><p>sets the passed <codeph>TRequestStatus</codeph> to <codeph>KRequestPending</codeph> </p> </li>
       
    25 <li id="GUID-0CB9A142-ED99-5455-B503-B9AB78F43993"><p>sends a message to the
       
    26 Kernel identifying the <codeph>RTimer</codeph> client-side handle, the <codeph>TRequestStatus</codeph> object
       
    27 and the time interval in microseconds.</p> </li>
       
    28 <li id="GUID-04280A19-96A4-526A-9E5A-7295112A16F0"><p>returns to the caller.</p> </li>
       
    29 </ul>
       
    30 <p>When the Kernel side timer completes, it posts the <codeph>TRequestStatus</codeph> with
       
    31 a completion code, normally <codeph>KErrNone</codeph>, and uses the thread
       
    32 id stored with the Kernel side timer object to signal the thread’s request
       
    33 semaphore.</p>
       
    34 <p>Provision of asynchronous services by the Kernel involves sending messages
       
    35 between the client thread and the Kernel.</p>
       
    36 <p>The Kernel provides the most basic services available. Its main services
       
    37 are defined in <filepath>e32std.h</filepath>, including timing, notification
       
    38 and the classes used in the client-server framework.</p>
       
    39 </conbody></concept>