Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License
"Eclipse Public License v1.0" which accompanies this distribution,
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
Nokia Corporation - initial contribution.
Contributors:
-->
<!DOCTYPE task
PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="GUID-AC9E8926-9BC8-5D46-91CA-139C89D04F32" xml:lang="en"><title>Enabling
Graceful Shutdown</title><shortdesc>Enabling graceful shutdown of a component is to determine whether
the System State Manager (SSM) has to undergo staged shutdown or existing
shutdown server mechanism must be used for device shutdown. </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody>
<context><p>Shutdown is to stop a server interface. Shutdown server handles
the shutdown of a device. It provides a notification mechanism for applications
before the shutdown occurs so that the shutdown occurs gracefully. </p><p>Follow
the procedure given below to enable or disable the graceful shutdown in either
of the following ways by using patchable constant, <codeph>KSsmGracefulShutdown</codeph>:</p></context>
<steps id="GUID-FC23F168-F28C-5C18-8768-D1DF6CF453E7">
<step id="GUID-97CFA2CC-92D6-5CF8-B016-D2F5879F0573"><cmd/>
<info>To enable support on the Emulator: </info>
<substeps id="GUID-1395E506-B90A-580D-B9FB-234136BB7A32">
<substep id="GUID-B3E0E655-7B10-572F-A327-5F10101CD655"><cmd/>
<info>Add the following line to the <filepath>epoc.ini</filepath> file. </info>
<stepxmp><codeblock id="GUID-2AAE8C53-910B-5517-B818-35CF55B899F9" xml:space="preserve">patchdata_ssmcmn_dll_KSsmGracefulShutdown 0xFFFFFFFF</codeblock> </stepxmp>
<info>By default, the patchable constant <xref href="GUID-DCA333AA-942D-359F-90B4-901CC57833C3.dita"><apiname>KSsmGracefulShutdown</apiname></xref> is
set to <codeph>0</codeph>. This means that shutdown will not be graceful. </info>
</substep>
</substeps>
</step>
<step id="GUID-D307B7BE-9B94-59A7-8029-B188F426A19C"><cmd/>
<info>To enable support at ROM build time: </info>
<substeps id="GUID-B010F808-F2C1-5791-9AA0-6605A262BE58">
<substep id="GUID-2C6E92E2-7411-5F11-BCFE-48E2B8094C08"><cmd/>
<info>Configure the Base Shutdown server mechanism or the SSMA graceful shutdown
mechanism at ROM build time using a patchable constant <xref href="GUID-DCA333AA-942D-359F-90B4-901CC57833C3.dita"><apiname>KSsmGracefulShutdown</apiname></xref>. </info>
<info>The value of <xref href="GUID-DCA333AA-942D-359F-90B4-901CC57833C3.dita"><apiname>KSsmGracefulShutdown</apiname></xref> determines whether
the System State Manager (SSM) staged shutdown or Base Shutdown server mechanism
must be used for device shutdown. The default value for <xref href="GUID-DCA333AA-942D-359F-90B4-901CC57833C3.dita"><apiname>KSsmGracefulShutdown</apiname></xref> is <codeph>0x0</codeph>.
If the device shutdown is to be done through SSM staged shutdown, this value
must be set to <codeph>0xFFFFFFFF</codeph>. </info>
</substep>
<substep id="GUID-4A78026C-2EFF-5713-AE6D-677FCE8F69C5"><cmd/>
<info>To patch these values, add a line to an <filepath>iby</filepath> or <filepath>oby</filepath> file
that is included in the ROM being built using the following format: </info>
<stepxmp><codeblock id="GUID-B2ED2D65-683C-54C5-B12A-A8B59C250149" xml:space="preserve">patchdata <dll> @ <symbol> <newvalue></codeblock></stepxmp>
<stepxmp><codeblock id="GUID-C89889BB-E1BD-5B60-A6F5-A2D050B74274" xml:space="preserve">patchdata ssmcmn.dll @ KSsmGracefulShutdown 0xFFFFFFFF</codeblock> </stepxmp>
</substep>
</substeps>
</step>
</steps>
<result><p>The component is shutdown gracefully in either of the following
ways by using patchable constant. </p> </result>
</taskbody><related-links>
<link href="GUID-4E5B1276-07D1-562A-8EE8-21DDE78D2CE5.dita"><linktext>System State
Management Policy</linktext></link>
<link href="GUID-9E0C9BB5-2AFC-54E4-B3A3-F3559E73FF03.dita"><linktext>Component
Shutdown Aware</linktext></link>
</related-links></task>