<!--$Id: notes.so,v 1.22 2008/02/21 03:14:49 david Exp $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB Reference Guide: VxWorks notes</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<a name="2"><!--meow--></a>
<table width="100%"><tr valign=top>
<td><b><dl><dt>Berkeley DB Reference Guide:<dd>Building Berkeley DB for VxWorks systems</dl></b></td>
<td align=right><a href="../build_vxworks/intro6x.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../build_vxworks/faq.html"><img src="../../images/next.gif" alt="Next"></a>
</td></tr></table>
<p align=center><b>VxWorks notes</b></p>
<p>Berkeley DB currently disallows the <a href="../../api_c/db_open.html#DB_TRUNCATE">DB_TRUNCATE</a> flag to the
<a href="../../api_c/db_open.html">DB->open</a> method on VxWorks because the operations this flag represents
are not fully supported under VxWorks.</p>
<p>The <a href="../../api_c/db_sync.html">DB->sync</a> method is implemented using an ioctl call into the file
system driver with the FIOSYNC command. Most, but not all file system
drivers support this call. Berkeley DB requires the use of a file system
that supports FIOSYNC.</p>
<b>Building and Running the Demo Program</b>
<p>The demo program should be built in a manner very similar to building
Berkeley DB. If you want different or additional BSP build specifications you
should add them by following the directions indicated in
<a href="../../ref/build_vxworks/intro.html">Building with Tornado 2.0 or
Tornado 2.2</a>.</p>
<p>The demo program can be downloaded and run by calling the entry function
<b>dbdemo</b> with the pathname of a database to use. The demo
program will ask for some input keys. It creates a database and adds
those keys into the database, using the reverse of the key as the data
value. When complete you can either enter EOF (control-D) or
<b>quit</b> and the demo program will display all of the key/data
items in the database.</p>
<b>Building and Running the Utility Programs</b>
<p>The Berkeley DB <a href="../../utility/index.html">utility programs</a>
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="../../utility/db_stat.html">db_stat</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
your system.</p>
<blockquote><pre>-> db_stat "-h /tmp/myenvhome -d mydatabase.db"</pre></blockquote>
<b>VxWorks 5.4/5.5: shared memory</b>
<p>The memory on VxWorks is always resident and fully shared among all
tasks running on the target. For this reason, the <a href="../../api_c/env_open.html#DB_LOCKDOWN">DB_LOCKDOWN</a>
flag has no effect and the <a href="../../api_c/env_open.html#DB_SYSTEM_MEM">DB_SYSTEM_MEM</a> flag is implied for any
application that does not specify the <a href="../../api_c/env_open.html#DB_PRIVATE">DB_PRIVATE</a> flag. Note
that the <a href="../../api_c/env_open.html#DB_SYSTEM_MEM">DB_SYSTEM_MEM</a> flag requires all applications use a
segment ID to ensure the applications do not overwrite each other's
database environments: see the <a href="../../api_c/env_set_shm_key.html">DB_ENV->set_shm_key</a> method for more
information.</p>
<b>VxWorks 5.4/5.5: building a small memory footprint library</b>
<p>A default small footprint build is provided. This default provides
equivalent to the <b>--enable-smallbuild</b> configuration option
described in <a href="../../ref/build_unix/small.html">Building a
small memory footprint library</a>. In order to build the small
footprint, you should move <b>db_config.h</b> aside and copy
<b>db_config_small.h</b> to <b>db_config.h</b>. Then open up
the appropriate small workspace file via Tornado and build as usual.</p>
<table width="100%"><tr><td><br></td><td align=right><a href="../build_vxworks/intro6x.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../build_vxworks/faq.html"><img src="../../images/next.gif" alt="Next"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>
Copyright 2K16 - 2K18 Indonesian Hacker Rulez