1<?xml version="1.0" encoding="UTF-8" standalone="no"?> 2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 3<html xmlns="http://www.w3.org/1999/xhtml"> 4 <head> 5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 6 <title>VxWorks notes</title> 7 <link rel="stylesheet" href="gettingStarted.css" type="text/css" /> 8 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /> 9 <link rel="start" href="index.html" title="Berkeley DB Programmer's Reference Guide" /> 10 <link rel="up" href="build_vxworks.html" title="Chapter��30.�� Building Berkeley DB for VxWorks" /> 11 <link rel="prev" href="build_vxworks_intro6x.html" title="Building for VxWorks 6.x" /> 12 <link rel="next" href="build_vxworks_faq.html" title="VxWorks FAQ" /> 13 </head> 14 <body> 15 <div class="navheader"> 16 <table width="100%" summary="Navigation header"> 17 <tr> 18 <th colspan="3" align="center">VxWorks notes</th> 19 </tr> 20 <tr> 21 <td width="20%" align="left"><a accesskey="p" href="build_vxworks_intro6x.html">Prev</a>��</td> 22 <th width="60%" align="center">Chapter��30.�� 23 Building Berkeley DB for VxWorks 24 </th> 25 <td width="20%" align="right">��<a accesskey="n" href="build_vxworks_faq.html">Next</a></td> 26 </tr> 27 </table> 28 <hr /> 29 </div> 30 <div class="sect1" lang="en" xml:lang="en"> 31 <div class="titlepage"> 32 <div> 33 <div> 34 <h2 class="title" style="clear: both"><a id="build_vxworks_notes"></a>VxWorks notes</h2> 35 </div> 36 </div> 37 </div> 38 <div class="toc"> 39 <dl> 40 <dt> 41 <span class="sect2"> 42 <a href="build_vxworks_notes.html#id1634647">Building and Running the Demo Program</a> 43 </span> 44 </dt> 45 <dt> 46 <span class="sect2"> 47 <a href="build_vxworks_notes.html#id1634846">Building and Running the Utility Programs</a> 48 </span> 49 </dt> 50 <dt> 51 <span class="sect2"> 52 <a href="build_vxworks_notes.html#id1634749">VxWorks 5.4/5.5: shared memory</a> 53 </span> 54 </dt> 55 <dt> 56 <span class="sect2"> 57 <a href="build_vxworks_notes.html#id1634867">VxWorks 5.4/5.5: building a small memory footprint library</a> 58 </span> 59 </dt> 60 </dl> 61 </div> 62 <p>Berkeley DB currently disallows the <a href="../api_reference/C/dbopen.html#open_DB_TRUNCATE" class="olink">DB_TRUNCATE</a> flag to the 63<a href="../api_reference/C/dbopen.html" class="olink">DB->open()</a> method on VxWorks because the operations this flag represents 64are not fully supported under VxWorks.</p> 65 <p>The <a href="../api_reference/C/dbsync.html" class="olink">DB->sync()</a> method is implemented using an ioctl call into the file 66system driver with the FIOSYNC command. Most, but not all file system 67drivers support this call. Berkeley DB requires the use of a file system 68that supports FIOSYNC.</p> 69 <div class="sect2" lang="en" xml:lang="en"> 70 <div class="titlepage"> 71 <div> 72 <div> 73 <h3 class="title"><a id="id1634647"></a>Building and Running the Demo Program</h3> 74 </div> 75 </div> 76 </div> 77 <p>The demo program should be built in a manner very similar to building 78Berkeley DB. If you want different or additional BSP build specifications you 79should add them by following the directions indicated in 80<a class="xref" href="build_vxworks.html#build_vxworks_intro" title="Building for VxWorks 5.4 and 5.5">Building for VxWorks 5.4 and 5.5</a>.</p> 81 <p>The demo program can be downloaded and run by calling the entry function 82<span class="bold"><strong>dbdemo</strong></span> with the pathname of a database to use. The demo 83program will ask for some input keys. It creates a database and adds 84those keys into the database, using the reverse of the key as the data 85value. When complete you can either enter EOF (control-D) or 86<span class="bold"><strong>quit</strong></span> and the demo program will display all of the key/data 87items in the database.</p> 88 </div> 89 <div class="sect2" lang="en" xml:lang="en"> 90 <div class="titlepage"> 91 <div> 92 <div> 93 <h3 class="title"><a id="id1634846"></a>Building and Running the Utility Programs</h3> 94 </div> 95 </div> 96 </div> 97 <p>The Berkeley DB utilities can be downloaded and run by calling the function equivalent to the utility's name. The utility functions take a string containing all the supported arguments. The program will then decompose that string into a traditional argc/argv used internally. For example, to execute <a href="../api_reference/C/db_stat.html" class="olink">db_stat utility</a> on a database within an environment you would execute the following from the windsh prompt. Obviously you would change the pathname and database name to reflect 98your system.</p> 99 <pre class="programlisting">> db_stat "-h /tmp/myenvhome -d mydatabase.db"</pre> 100 </div> 101 <div class="sect2" lang="en" xml:lang="en"> 102 <div class="titlepage"> 103 <div> 104 <div> 105 <h3 class="title"><a id="id1634749"></a>VxWorks 5.4/5.5: shared memory</h3> 106 </div> 107 </div> 108 </div> 109 <p>The memory on VxWorks is always resident and fully shared among all 110tasks running on the target. For this reason, the <a href="../api_reference/C/envopen.html#open_DB_LOCKDOWN" class="olink">DB_LOCKDOWN</a> 111flag has no effect and the <a href="../api_reference/C/envopen.html#envopen_DB_SYSTEM_MEM" class="olink">DB_SYSTEM_MEM</a> flag is implied for any 112application that does not specify the <a href="../api_reference/C/envopen.html#open_DB_PRIVATE" class="olink">DB_PRIVATE</a> flag. Note 113that the <a href="../api_reference/C/envopen.html#envopen_DB_SYSTEM_MEM" class="olink">DB_SYSTEM_MEM</a> flag requires all applications use a 114segment ID to ensure the applications do not overwrite each other's 115database environments: see the <a href="../api_reference/C/envset_shm_key.html" class="olink">DB_ENV->set_shm_key()</a> method for more 116information.</p> 117 </div> 118 <div class="sect2" lang="en" xml:lang="en"> 119 <div class="titlepage"> 120 <div> 121 <div> 122 <h3 class="title"><a id="id1634867"></a>VxWorks 5.4/5.5: building a small memory footprint library</h3> 123 </div> 124 </div> 125 </div> 126 <p>A default small footprint build is provided. This default provides 127equivalent to the <span class="bold"><strong>--enable-smallbuild</strong></span> configuration option 128described in <a class="xref" href="build_unix_small.html" title="Building a small memory footprint library">Building a small memory footprint library</a>. In order to build the small 129footprint, you should move <code class="filename">db_config.h</code> aside and copy 130<code class="filename">db_config_small.h</code> to <code class="filename">db_config.h</code>. Then open up 131the appropriate small workspace file via Tornado and build as usual.</p> 132 </div> 133 </div> 134 <div class="navfooter"> 135 <hr /> 136 <table width="100%" summary="Navigation footer"> 137 <tr> 138 <td width="40%" align="left"><a accesskey="p" href="build_vxworks_intro6x.html">Prev</a>��</td> 139 <td width="20%" align="center"> 140 <a accesskey="u" href="build_vxworks.html">Up</a> 141 </td> 142 <td width="40%" align="right">��<a accesskey="n" href="build_vxworks_faq.html">Next</a></td> 143 </tr> 144 <tr> 145 <td width="40%" align="left" valign="top">Building for VxWorks 6.x��</td> 146 <td width="20%" align="center"> 147 <a accesskey="h" href="index.html">Home</a> 148 </td> 149 <td width="40%" align="right" valign="top">��VxWorks FAQ</td> 150 </tr> 151 </table> 152 </div> 153 </body> 154</html> 155