📄 rcu9.htm
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="GENERATOR" content="Quadralay WebWorks Publisher Professional Edition 6.0.5">
<meta name="TEMPLATEBASE" content="book_html">
<meta name="LASTUPDATED" content="12/04/03 16:05:57">
<title>10.2.3 Initializing and de-initializing an RCU </title>
<STYLE TYPE="text/css">
<!--
span.Signal { text-transform: uppercase; font-family: Verdana }
-->
</STYLE>
</head>
<body link="#3366CC" vlink="#9999CC" text="#000000" alink="#0000CC" bgcolor="#FFFFFF"
background="images/backgrnd.gif">
<p><img src="images/stlogo.gif" width="106" height="83" align="left"
alt="logo here!"> </p>
<table width="331" border="0" align="right" cellpadding="0" cellspacing="0">
<tr>
<td><a href="a_refman.htm"><img src="images/navtoc.gif" width="84" height="23"
border="0" alt="TOC"> </a></td>
<td><a href="rcu8.htm"><img src="images/navprev.gif" width="80" height="23"
border="0" alt="PREV"> </a></td>
<td><a href="rcu10.htm"><img src="images/navnext.gif" width="83" height="23"
border="0" alt="NEXT"> </a></td>
<td><a href="a_refmaa.htm"><img src="images/navidx.gif" width="84" height="23"
border="0" alt="INDEX"> </a></td>
</tr>
</table>
<p><br clear="all">
</p>
<hr align="left">
<blockquote>
<h3>
<a name="1204645"> </a><font color="#003366" face="Verdana, Arial, Helvetica, sans-serif">10.2.3 Initializing and de-initializing an RCU</font>
</h3>
<p>
<a name="1204646"> </a><font size=2 face="Verdana, Arial, Helvetica, sans-serif">The function <font size=2 face=Courier><strong>rcu_init</strong></font> initializes an RCU ready for the entry point to be called. This function is passed the RCU header, together with the addresses of the code section, static area, relocation, constructor, and destructor tables and the debug filename, and returns information about the RCU by writing into the <font size=2 face=Courier><strong>rcu_data</strong></font> structure:</font>
</p>
<a name="1208182"> </a><font size=2 face=Courier><strong>void rcu_init( rcu_header <font size=2 face=Courier><strong><em>*header</em></strong></font>,<br>牋牋牋牋牋牋牋爑nsigned char <font size=2 face=Courier><strong><em>*codesection</em></strong></font>,<br>牋牋牋牋牋牋牋爑nsigned char <font size=2 face=Courier><strong><em>*staticarea</em></strong></font>,<br>牋牋牋牋牋牋牋爄nt <font size=2 face=Courier><strong><em>*relocations</em></strong></font>,<br>牋牋牋牋牋牋牋爄nt <font size=2 face=Courier><strong><em>*constructors</em></strong></font>,<br>牋牋牋牋牋牋牋爄nt <font size=2 face=Courier><strong><em>*deconstructors</em></strong></font>,<br>牋牋牋牋牋牋牋燾har <font size=2 face=Courier><strong><em>*dbgfilename</em></strong></font>,<br>牋牋牋牋牋牋牋爎cu_data <font size=2 face=Courier><strong><em>*data </em></strong></font>);<br></strong></font>
<p>
<a name="1204648"> </a><font size=2 face="Verdana, Arial, Helvetica, sans-serif"><font size=2 face=Courier><strong>rcu_init</strong></font> initializes the BSS section of the static data area, patch the data section using the relocation table, invoke the constructor functions and inform the debugger of the new program. <font size=2 face=Courier><strong>rcu_init</strong></font> then computes the entry point and static link values of the RCU and stores these values in the structure <font size=2 face=Courier><strong>rcu_data</strong></font>. <font size=2 face=Courier><strong>rcu_data</strong></font> contains the following fields, all of which are initialized by <font size=2 face=Courier><strong>rcu_init</strong></font>:</font>
</p>
<a name="1210825"> </a><font size=2 face=Courier><strong>typedef struct {<br>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -