1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML> 3<HEAD> 4<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 5<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<TITLE>OS_RestoreFunctionCost</TITLE> 8<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 9</HEAD> 10<BODY> 11<H1 align="left">OS_RestoreFunctionCost <IMG src="../../image/NTR.gif" align="middle"><IMG src="../../image/TWL.gif" align="middle"></H1> 12<H2>Syntax</H2> 13<DL> 14 <DD><CODE>#include <nitro/os.h></CODE><BR> 15 <BR> 16 <CODE>BOOL OS_RestoreFunctionCost( BOOL enable );</CODE> 17</DL> 18<H2>Arguments</H2> 19<TABLE border="1" width="100%"> 20 <TBODY> 21 <TR> 22 <TD width="13%"><EM><STRONG>enable</STRONG></EM></TD> 23 <TD width="87%">The status of the function cost calculation feature to be set (enabled / disabled)</TD> 24 </TR> 25 </TBODY> 26</TABLE> 27<H2>Return Values</H2> 28<P>The status before this function was called. TRUE indicates that it was enabled. FALSE indicates that it was disabled.</P> 29<H2>Description</H2> 30<P>This function enables or disables the function cost calculation feature.</P> 31<P>This switch decides whether the function entry and exit (<CODE>__PROFILE_ENTRY</CODE>, <CODE>__PROFILE_EXIT</CODE>) that are inserted by the <CODE>profile</CODE> feature will become enabled. Therefore take note of how you time enable/disable switching. For example, if you call a function called <CODE>test()</CODE> when in disabled status, and then enable from within the <CODE>test()</CODE> function, consistency will not be possible because it will only store information at <CODE>__PROFILE_EXIT</CODE>, even though nothing was done at the function entry (<CODE>__PROFILE_ENTRY</CODE>).</P> 32<P>Enable / disable switches are set for each cost calculation buffer. Therefore one will not change all.</P> 33<P>If this function is compiled for debugging, it will function properly. However, if compiled for the final ROM version (<CODE>FINALROM</CODE>) library, it will not do anything.</P> 34<H2>See Also</H2> 35<P><CODE><A href="OS_InitFunctionCost.html">OS_InitFunctionCost</A>, <A href="OS_EnableFunctionCost.html">OS_EnableFunctionCost</A>, <A href="OS_DisableFunctionCost.html">OS_DisableFunctionCost</A><BR></CODE></P> 36<H2>Revision History</H2> 37<P>2004/05/18 Initial version.</P> 38<hr><p>CONFIDENTIAL</p></body> 39</HTML>