Symbian3/PDK/Source/GUID-16AED228-539F-4BF7-A7FD-9A01FF1A9A84.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Thu, 11 Mar 2010 18:02:22 +0000
changeset 3 46218c8b8afa
parent 1 25a17d01db0c
child 5 f345bda72bc4
permissions -rw-r--r--
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.
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">
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
    12
<concept id="GUID-16AED228-539F-4BF7-A7FD-9A01FF1A9A84" xml:lang="en"><title>Locking</title><shortdesc>This document describes SMP locks and outlines the need of introducing
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
    13
locks in the code.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
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
    14
<p>Locks are used to synchronize the data between threads in the kernel. They
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
    15
can be also used to synchronize access to data in user side threads In SMP,
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
    16
threads are executed in parallel, which means that if locks are not applied
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
    17
to the code it could result in a race condition. Race conditions lead to system
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
    18
crashes and data corruptions. </p>
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
    19
<section id="GUID-6DA960AD-4E33-4B15-B960-F8077530AC88"><title>Locking Granularity</title><p>An
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
    20
important property of a lock is its granularity. The granularity is a measure
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
    21
of the amount of data the lock is protecting. There are two different granularities
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
    22
for locks:</p><ul>
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
    23
<li><p><b>Coarse-Grained Locks</b> enclose a large area of shared code or
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
    24
multiple areas of unrelated data. The lock reduces the number of threads that
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
    25
run concurrently resulting in serial execution making the code behave like
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
    26
a single thread process. Coarse locks are applied in parallel. One lock can
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
    27
be applied to each kernel subsystem.</p></li>
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
    28
</ul><p>The following diagram illustrates how a Coarse-Grained Lock covers
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
    29
many parts of code. It not only simplifies the locking action itself but also
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
    30
frees developers from having to load all the members of a code in order to
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
    31
lock them. In order to get concurrency in the operating system, the operating
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
    32
system must allow more than one process (or interrupt) to execute at the same
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
    33
time. To do this, we divide the OS into sections and give each section a lock.
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
    34
For a small number of processors, we only need a small number of locks, each
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
    35
covering a large region of the OS. This model of coarse-grained locking provides
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
    36
good scaling on small numbers of processors.</p><fig id="GUID-D70A45BC-E281-403E-9D7F-519D990F0DAE">
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
    37
<title>Coarse-Grained Lock</title>
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
    38
<desc/>
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
    39
<image href="GUID-91BD4E81-4CDC-4279-8E19-5B79A63B838E_d0e638812_href.png" placement="inline"/>
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
    40
</fig><ul>
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
    41
<li><p><b>Fine-Grained Locks</b> enclose a small area of code for example
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
    42
a data structure. These locks are added to the code and the user must remember
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
    43
to release the lock. Fine locks are error prone. </p></li>
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
    44
</ul><p>As the number of processors increases, the number of locks also increases.
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
    45
The following diagram illustrates how fine locks are applied to data. In other
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
    46
words, fine locks protect individual data structures or even parts of data
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
    47
structures. All those locks add instructions and data.  To do this, we divide
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
    48
the OS into sections and divide the section into small pieces of code and
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
    49
apply lock for each piece of code. Fine-grained locking can result in near
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
    50
perfect scaling.</p><fig id="GUID-97F40770-1B6C-435B-AFF0-3BA3AC66F7DA">
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
    51
<title>Fine-Grained Lock</title>
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
    52
<image href="GUID-2E3F9FBD-21FE-4F02-B410-F756012805D2_d0e638829_href.png" placement="inline"/>
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
    53
</fig></section>
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
    54
<section id="GUID-94FDD42D-9D26-4A41-BFB6-57648083EC41"><title>Type of Locks</title><ul>
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
    55
<li><p><xref href="GUID-FB1605A8-9946-364C-A649-DEF60E1F761B.dita"><apiname>TSpinLock</apiname></xref> is the lightest weight lock available
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
    56
kernel side. If a process attempts to acquire a spinlock and one is not available,
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
    57
the process will keep trying (spinning) until it can acquire the lock. Spinlocks
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
    58
should be used to lock data in situations where the lock is not held for a
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
    59
long time.</p></li>
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
    60
</ul><ul>
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
    61
<li><p><xref href="GUID-669D0368-7ADE-35FA-881C-51D476D45B8A.dita"><apiname>RFastLock</apiname></xref> is the lightest weight lock available
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
    62
user side. There is no priority inheritance. This is a layer over a standard
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
    63
semaphore, and only calls into the kernel side if there is contention.</p></li>
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
    64
</ul><ul>
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
    65
<li><p><xref href="GUID-C0FEA3A0-7DD3-3B87-A919-CB973BC05766.dita"><apiname>RMutex</apiname></xref> is used to serialize access to a section
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
    66
of re-entrant code that cannot be executed concurrently by more than one thread.
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
    67
A mutex object allows one thread into a controlled section, forcing other
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
    68
threads which attempt to gain access to that section to wait until the first
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
    69
thread has exited from that section.</p></li>
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
    70
</ul><ul>
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
    71
<li><p><xref href="GUID-AED27A76-3645-3A04-B80D-10473D9C5A27.dita"><apiname>RSemaphore</apiname></xref> is used for Inter Process Communication
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
    72
(IPC), they are similar in performance to <codeph>RMutex</codeph>. <codeph>RSemaphore</codeph> locks
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
    73
are used when the lock must be held for a long time. These locks put the thread
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
    74
into sleep mode and are used to synchronize user contexts.</p></li>
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
    75
</ul></section>
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
    76
</conbody><related-links>
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
    77
<link href="GUID-387E98B0-568D-4DBB-9A9E-616E41E96B58.dita"><linktext>SMP - Overview</linktext>
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
    78
</link>
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
    79
<link href="GUID-FA120B3F-4EC4-5A0A-8A36-D5CD032CF1B0.dita"><linktext>Using Mutexes</linktext>
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
    80
</link>
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
    81
<link href="GUID-9D00655C-AFBA-5DF7-B11B-6B2355BDF08D.dita"><linktext>Using Semaphores</linktext>
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
    82
</link>
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
    83
</related-links></concept>