Symbian3/PDK/Source/GUID-547CF71C-6A62-57C0-A9BE-E76B4286C6D6.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Tue, 30 Mar 2010 11:42:04 +0100
changeset 4 4816d766a08a
parent 3 46218c8b8afa
child 5 f345bda72bc4
permissions -rw-r--r--
Week 12 contribution of SDK documentation_content. See release notes for details. Fixes Bug 1892, Bug 1522, Bug 1520, Bug 394, Bug 1319, Bug 344, Bug 1897
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3
46218c8b8afa week 10 bug fix submission (SF PDK version): Bug 1892, Bug 1897, Bug 1319. Also 3 or 4 documents were found to contain code blocks with SFL, which has been fixed. Partial fix for broken links, links to Forum Nokia, and the 'Symbian platform' terminology issues.
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
     1
<?xml version="1.0" encoding="utf-8"?>
46218c8b8afa week 10 bug fix submission (SF PDK version): Bug 1892, Bug 1897, Bug 1319. Also 3 or 4 documents were found to contain code blocks with SFL, which has been fixed. Partial fix for broken links, links to Forum Nokia, and the 'Symbian platform' terminology issues.
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
     2
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
46218c8b8afa week 10 bug fix submission (SF PDK version): Bug 1892, Bug 1897, Bug 1319. Also 3 or 4 documents were found to contain code blocks with SFL, which has been fixed. Partial fix for broken links, links to Forum Nokia, and the 'Symbian platform' terminology issues.
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
     3
<!-- This component and the accompanying materials are made available under the terms of the License 
46218c8b8afa week 10 bug fix submission (SF PDK version): Bug 1892, Bug 1897, Bug 1319. Also 3 or 4 documents were found to contain code blocks with SFL, which has been fixed. Partial fix for broken links, links to Forum Nokia, and the 'Symbian platform' terminology issues.
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
     4
"Eclipse Public License v1.0" which accompanies this distribution, 
46218c8b8afa week 10 bug fix submission (SF PDK version): Bug 1892, Bug 1897, Bug 1319. Also 3 or 4 documents were found to contain code blocks with SFL, which has been fixed. Partial fix for broken links, links to Forum Nokia, and the 'Symbian platform' terminology issues.
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
     5
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
46218c8b8afa week 10 bug fix submission (SF PDK version): Bug 1892, Bug 1897, Bug 1319. Also 3 or 4 documents were found to contain code blocks with SFL, which has been fixed. Partial fix for broken links, links to Forum Nokia, and the 'Symbian platform' terminology issues.
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
     6
<!-- Initial Contributors:
46218c8b8afa week 10 bug fix submission (SF PDK version): Bug 1892, Bug 1897, Bug 1319. Also 3 or 4 documents were found to contain code blocks with SFL, which has been fixed. Partial fix for broken links, links to Forum Nokia, and the 'Symbian platform' terminology issues.
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
     7
    Nokia Corporation - initial contribution.
46218c8b8afa week 10 bug fix submission (SF PDK version): Bug 1892, Bug 1897, Bug 1319. Also 3 or 4 documents were found to contain code blocks with SFL, which has been fixed. Partial fix for broken links, links to Forum Nokia, and the 'Symbian platform' terminology issues.
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
     8
Contributors: 
46218c8b8afa week 10 bug fix submission (SF PDK version): Bug 1892, Bug 1897, Bug 1319. Also 3 or 4 documents were found to contain code blocks with SFL, which has been fixed. Partial fix for broken links, links to Forum Nokia, and the 'Symbian platform' terminology issues.
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
     9
-->
46218c8b8afa week 10 bug fix submission (SF PDK version): Bug 1892, Bug 1897, Bug 1319. Also 3 or 4 documents were found to contain code blocks with SFL, which has been fixed. Partial fix for broken links, links to Forum Nokia, and the 'Symbian platform' terminology issues.
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
    10
<!DOCTYPE concept
46218c8b8afa week 10 bug fix submission (SF PDK version): Bug 1892, Bug 1897, Bug 1319. Also 3 or 4 documents were found to contain code blocks with SFL, which has been fixed. Partial fix for broken links, links to Forum Nokia, and the 'Symbian platform' terminology issues.
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
    11
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
1
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    12
<concept xml:lang="en" id="GUID-547CF71C-6A62-57C0-A9BE-E76B4286C6D6"><title>Threads And Processes Overview</title><prolog><metadata><keywords/></metadata></prolog><conbody><section id="GUID-D894C473-2BCF-4988-BF07-435C7A779BAF"><title>Purpose</title> <p>Provides access to processes, threads, and thread-local storage.</p> <p>Processes are usually only manipulated directly by system programs. Threads can be directly manipulated by multi-threaded programs. Note however that the active objects framework provided by the Asynchronous Services API is usually preferred to multi-threading in Symbian OS programming.</p> </section> <section id="GUID-90EBDA3E-A7E1-4460-9A63-CDEC922AC58A"><title>Description</title> <p>The API has three key concepts: process, thread, and thread-local storage. </p> <p><b>Process</b> </p> <p>A program running in Symbian OS is a process, which can contains one or more conceptually concurrent threads of execution. Each user process has its own private address space. A process can create another process. </p> <p>Processes are Kernel objects and so are accessed by user programs through handles. </p> <p>The process handle interface is provided by <xref href="GUID-9DD1EA2B-DC59-315C-8E9C-CE6D9461B695.dita"><apiname>RProcess</apiname></xref>.</p> <p><xref href="GUID-71AF2BC3-5CCD-3561-8807-7B8CDC1A64E9.dita"><apiname>TFindProcess</apiname></xref> is used for finding another process.</p> <p><b>Thread</b> </p> <p>A thread is the unit of execution within a process. The scheduling of threads is pre-emptive, i.e. a currently executing thread may be suspended at any time to allow another thread to run.</p> <p>Note the following properties of threads:</p> <ul><li id="GUID-7FA506FD-3F36-51AB-87C6-0A4415ED4257"><p>every process has a primary thread that is created when the process is initialised </p> </li> <li id="GUID-3C2107B8-2979-5835-8985-AC289C75AAA6"><p>a thread can create, suspend, resume, panic and kill other threads, subject to protection</p> </li> <li id="GUID-D4298E05-F3C7-59E9-9E05-EA43BAE51D93"><p>data can be passed between threads whether those threads are in different processes or the same process</p> </li> <li id="GUID-8EF7BA10-3BBA-568B-A0BE-00A6F4B58D6C"><p>each thread has a priority: the scheduler runs the highest-priority thread that is ready to run </p> </li> </ul> <p>Threads are Kernel objects and so are accessed by user programs through handles. </p> <p>The thread handle interface is provided by <xref href="GUID-B0E661BC-4058-3256-B9C3-5A4FD52F6DE5.dita"><apiname>RThread</apiname></xref>. </p> <p><xref href="GUID-29F27759-CC53-36DF-AE92-623F061D6C96.dita"><apiname>TFindThread</apiname></xref> is used for finding another thread.</p> <p>The System Static Functions API <xref href="GUID-C197C9A7-EA05-3F24-9854-542E984C612D.dita"><apiname>User</apiname></xref> class provides a number of functions that operate on the current thread.</p> <p><b>Thread-local storage</b> </p> <p>Thread-local storage in Symbian OS supports one machine word of static data per DLL per thread. The scope of the word is the thread and is only accessible to DLL code. DLL code running on behalf of one thread does not see the same word when running on behalf of another thread.</p> <p>The thread-local storage interface is provided by <xref href="GUID-6085A635-1664-323E-997A-EA11F75FBAC3.dita"><apiname>Dll</apiname></xref>.</p> </section> <section id="GUID-33582F5A-3ADA-434C-BDD2-503AA667BAE0"><title>See also</title> <p><xref href="GUID-1294F540-FDA7-5050-BAFB-3C9888491B98.dita">Asynchronous Services Overview</xref> </p> <p><xref href="GUID-FF8F5D97-7D37-5F6B-84A3-C064E2FD53E0.dita">System Static Functions Overview</xref> </p> </section> </conbody></concept>