00001 /*<std-header orig-src='shore' incl-file-exclusion='SM_VAS_H'> 00002 00003 $Id: sm_vas.h,v 1.32 2010/09/21 14:26:17 nhall Exp $ 00004 00005 SHORE -- Scalable Heterogeneous Object REpository 00006 00007 Copyright (c) 1994-99 Computer Sciences Department, University of 00008 Wisconsin -- Madison 00009 All Rights Reserved. 00010 00011 Permission to use, copy, modify and distribute this software and its 00012 documentation is hereby granted, provided that both the copyright 00013 notice and this permission notice appear in all copies of the 00014 software, derivative works or modified versions, and any portions 00015 thereof, and that both notices appear in supporting documentation. 00016 00017 THE AUTHORS AND THE COMPUTER SCIENCES DEPARTMENT OF THE UNIVERSITY 00018 OF WISCONSIN - MADISON ALLOW FREE USE OF THIS SOFTWARE IN ITS 00019 "AS IS" CONDITION, AND THEY DISCLAIM ANY LIABILITY OF ANY KIND 00020 FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 00021 00022 This software was developed with support by the Advanced Research 00023 Project Agency, ARPA order number 018 (formerly 8230), monitored by 00024 the U.S. Army Research Laboratory under contract DAAB07-91-C-Q518. 00025 Further funding for this work was provided by DARPA through 00026 Rome Research Laboratory Contract No. F30602-97-2-0247. 00027 00028 */ 00029 00030 #ifndef SM_VAS_H 00031 #define SM_VAS_H 00032 00033 #include "w_defines.h" 00034 00035 /* -- do not edit anything above this line -- </std-header>*/ 00036 00037 /* DOXYGEN documentation : */ 00038 00039 /**\addtogroup SSMAPI 00040 * 00041 * \section COMPILE Compiling and Linking Server Code 00042 * \addtogroup SSMAPI 00043 * 00044 * The compiler invocation requires certain flags to ensure the 00045 * use of pthreads and the LP64 data model; it also has to 00046 * include the storage manager's libraries. 00047 * 00048 * When the storage manager is built, 00049 * its "make" flags are written to a file called 00050 * - "makeflags" 00051 * in the source root directory (or the installed include/ directory). 00052 * These flags usually include (subject to platform): 00053 * - -DARCH_LP64 -m64 00054 * - -D_POSIX_THREAD_SEMANTICS -D_REENTRANT -pthread (Linux) 00055 * - -library=stlport4 -features=extensions,zla -DSOLARIS2 -mt -D_POSIX_THREAD_SEMANTICS -D_REENTRANT -lpthread (Solaris) 00056 * 00057 * The list of libraries must include -lrt and possibly -lnsl. 00058 * 00059 * \section EXAMPLES Examples 00060 * \addtogroup SSMAPI 00061 * 00062 * Any code that uses the SHORE Storage Manager requires 00063 * \code 00064 * #include <sm_vas.h> 00065 * \endcode 00066 * This header file encapsulates all the storage manager header files needed 00067 * by a value-added server. 00068 * 00069 * \subsection EXMIN A Minimal Example 00070 * For a simple example, see \ref startstop.cpp 00071 * 00072 * \subsection EXINIT_CONFIG_OPTIONS Setting Up Run-Time Options 00073 * The example \ref init_config_options.cpp 00074 * demonstrates a more extensive handling of run-time options, and 00075 * is used in other examples, below. 00076 * 00077 * \subsection EXCREATE_REC Creating a file of Records 00078 * The example \ref create_rec.cpp 00079 * shows a server that creates a file of records. 00080 * Thus, it also contains code to initialize a volume and 00081 * create a file. 00082 * 00083 * \subsection EXLOG_EXCEED Use of ss_m::ss_m Arguments 00084 * The example \ref log_exceed.cpp 00085 * demonstrates the use of the arguments to the 00086 * storage manager constructor (ss_m::ss_m). 00087 * It is an extension of the above example that 00088 * generates enough log to run out of log space. 00089 */ 00090 00091 /**\example startstop.cpp 00092 * This is an example of using <sm_vas.h>. It shows a minimal 00093 * storage manager server, which does nothing but start up (recover) and 00094 * shut down. 00095 */ 00096 /**\example init_config_options.cpp 00097 * This example demonstrates the use of run-time options. 00098 * This code is used for other examples. 00099 */ 00100 /**\example create_rec.cpp 00101 * This example demonstrates creating a file of records. 00102 * It also demonstrates scanning the file of records, 00103 * creating a device and volume, and use of the root index. 00104 * It must also contain, of course, the creation of options, starting up 00105 * and shutting down a storage manager. 00106 */ 00107 /**\example log_exceed.cpp 00108 * This example demonstrates the use of the ss_m::ss_m arguments. 00109 * It is an extension of the \ref create_rec.cpp example that 00110 * generates enough log to run out of log space. 00111 */ 00112 #include "w.h" 00113 #include <cstddef> 00114 #include <w_stream.h> 00115 00116 #include "option.h" 00117 #include "basics.h" 00118 #include "lid_t.h" 00119 #include "vec_t.h" 00120 #include "tid_t.h" 00121 #include "stid_t.h" 00122 00123 #undef SM_SOURCE 00124 #undef SM_LEVEL 00125 #include "sm.h" 00126 #include "pin.h" 00127 #include "scan.h" 00128 #include "kvl_t.h" // define kvl_t for lock_base_t 00129 #include "lock_s.h" // define lock_base_t 00130 00131 #include "sort.h" // define sort_stream_i 00132 #include "sort_s.h" // key_info_t 00133 00134 /*<std-footer incl-file-exclusion='SM_VAS_H'> -- do not edit anything below this line -- */ 00135 00136 #endif /*</std-footer>*/