###

Berkeley DB Reference Guide:
  Building Berkeley DB for VxWorks systems

# VxWorks notes

Berkeley DB currently disallows the DB_TRUNC flag to DB->open. The operations this flag represent are not fully supported under VxWorks 5.4.

The memory on VxWorks is always resident and fully shared among all tasks running on the target. For this reason, the DB_SYSTEM_MEM flag is implied for any application that does not specify the DB_PRIVATE flag. Additionally, applications must use a segment ID to ensure different applications do not overwrite each other's database environments. See the DBENV->set_shm_key function for more information. Also, the DB_LOCKDOWN flag has no effect.

The DB->sync function 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 supporting FIOSYNC.

### Building and Running the Example Programs

Each example program can be downloaded and run by calling the function equivalent to the example's name. You may have to edit the pathname to the environments and database names in the examples' sources. The examples included are:

Name | Description
--- | ---
ex_access | Simple access method example.
ex_btrec | Example using Btree and record numbers.
ex_dbclient | Example running an RPC client. Takes a hostname as an argument, e.g., ex_dbclient "myhost".
ex_env | Example using an environment.
ex_mpool | Example using mpools.
ex_tpcb | Example using transactions. This example requires two invocations both taking an integer identifier as an argument. This identifier allows for multiple sets of databases to be used within the same environment. The first is to initialize the databases, e.g., ex_tpcb_init 1. The second is to run the program on those databases, e.g., ex_tpcb 1.

Copyright Sleepycat Software