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>MICache</title>
8<link rel="stylesheet" href="../../css/nitro.css" type="text/css" />
9</head>
10<body>
11<h1>MICache <IMG src="../../image/NTR.gif" align="middle"><IMG src="../../image/TWL.gif" align="middle"></h1>
12<h2>Definition</h2>
13
14<dl>
15  <dd>
16  <pre><code>#include &lt;nitro/mi.h&gt;<br />
17
18typedef struct MICachePage
19{
20    struct MICachePage *next;
21    u32                 offset;
22    u8                 *buffer;
23}
24MICachePage;
25
26typedef struct MICache
27{
28<span style="color:#008000">/* private: */</span>
29    u32             pagewidth;
30    MICachePage    *valid;
31    MICachePage    *invalid;
32    MICachePage    *loading;
33    int             valid_total;
34    int             invalid_total;
35    int             loading_total;
36}
37MICache;</code></pre>
38  </dd>
39</dl>
40
41<h2>Description</h2>
42<p>This structure is for implementing a memory cache for the <a href="../device/MIDevice.html"><CODE>MIDevice</CODE></a> structure.</p>
43<p>This feature is a utility that enables efficient read access to devices. The structure has the following features:</p>
44<ul>
45<li>This improves the processing efficiency of the device control codes that perform semi-local random access.<br>Previously loaded data is stored in units of pages, so when repeatedly referencing a limited range of data, the device is only accessed once.</li>
46<li>It allows you to write flexible asynchronous code that is both environment- and device-independent.<br>
47  Access to the cache and the actual load process are provided in fairly simple formats so you can implement an unfettered wait-for-completion routine tailored to the operations of your application.</li>
48</ul>
49
50
51<h2>See Also</h2>
52<p><code><a href="MI_InitCache.html">MI_InitCache</a>, <a href="MI_ReadCache.html">MI_ReadCache</a>, <a href="MI_LoadCache.html">MI_LoadCache</a>, <a href="MI_IsCacheLoading.html">MI_IsCacheLoading</a><br /> <a href="../device/MIDevice.html">MIDevice</a></code></p>
53<h2>Revision History</h2>
54<p>2007/05/16 Initial version.</p>
55<hr><p>CONFIDENTIAL</p></body>
56</html>
57