• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Classes
  • Files
  • Examples
  • File List

app_config.h

00001 //
00002 // File: app_config.h
00003 // Authors: Darren Erik Vengroff
00004 //          Octavian Procopiuc <[email protected]>
00005 //
00006 // Created: 10/6/94
00007 //
00008 // $Id: app_config.h,v 1.36 2004/08/17 16:49:16 jan Exp $
00009 //
00010 #ifndef _APP_CONFIG_H
00011 #define _APP_CONFIG_H
00012 
00013 // Get the configuration as set up by the TPIE configure script.
00014 #include <config.h>
00015 
00016 // <><><><><><><><><><><><><><><><><><><><><><> //
00017 // <><><><><><><> Developer use  <><><><><><><> //
00018 // <><><><><><><><><><><><><><><><><><><><><><> //
00019 
00020 // Set up some defaults for the test applications
00021 
00022 #include <portability.h>
00023 #include <sys/types.h> // for size_t
00024 #include <stdlib.h>    // for random()
00025 
00026 #define DEFAULT_TEST_SIZE (20000000)
00027 #define DEFAULT_RANDOM_SEED 17
00028 #define DEFAULT_TEST_MM_SIZE (1024 * 1024 * 32)
00029 
00030 extern bool verbose;
00031 extern TPIE_OS_SIZE_T test_mm_size;
00032 extern TPIE_OS_OFFSET test_size;
00033 extern int random_seed;
00034 
00035 
00036 // <><><><><><><><><><><><><><><><><><><><><><> //
00037 // <><><> Choose default BTE COLLECTION  <><><> //
00038 // <><><><><><><><><><><><><><><><><><><><><><> //
00039 
00040 #if (!defined (BTE_COLLECTION_IMP_MMAP) && !defined (BTE_COLLECTION_IMP_UFS) && !defined (BTE_COLLECTION_IMP_USER_DEFINED))
00041 // Define only one (default is BTE_COLLECTION_IMP_MMAP)
00042  #define BTE_COLLECTION_IMP_MMAP
00043 //#define BTE_COLLECTION_IMP_UFS
00044 //#define BTE_COLLECTION_IMP_USER_DEFINED
00045 #endif
00046 
00047 // <><><><><><><><><><><><><><><><><><><><><><> //
00048 // <><><><><><> Choose BTE STREAM  <><><><><><> //
00049 // <><><><><><><><><><><><><><><><><><><><><><> //
00050 
00051 // Define only one (default is BTE_STREAM_IMP_UFS)
00052 #define BTE_STREAM_IMP_UFS
00053 //#define BTE_STREAM_IMP_MMAP
00054 //#define BTE_STREAM_IMP_STDIO
00055 //#define BTE_STREAM_IMP_USER_DEFINED
00056 
00057 
00058 // <><><><><><><><><><><><><><><><><><><><><><><><> //
00059 // <> BTE_COLLECTION_MMAP configuration options  <> //
00060 // <><><><><><><><><><><><><><><><><><><><><><><><> //
00061 
00062 // Define write behavior.
00063 // Allowed values:
00064 //  0    (synchronous writes)
00065 //  1    (asynchronous writes using MS_ASYNC - see msync(2))
00066 //  2    (asynchronous bulk writes) [default]
00067 #ifndef BTE_COLLECTION_MMAP_LAZY_WRITE
00068  #define BTE_COLLECTION_MMAP_LAZY_WRITE 2
00069 #endif
00070 
00071 // <><><><><><><><><><><><><><><><><><><><><><><><> //
00072 // <> BTE_COLLECTION_UFS configuration options   <> //
00073 // <><><><><><><><><><><><><><><><><><><><><><><><> //
00074 
00075 
00076 // <><><><><><><><><><><><><><><><><><><><><><><><> //
00077 // <><> BTE_STREAM_MMAP configuration options  <><> //
00078 // <><><><><><><><><><><><><><><><><><><><><><><><> //
00079 
00080 #ifdef BTE_STREAM_IMP_MMAP
00081 // Define logical blocksize factor (default is 32)
00082  #ifndef BTE_STREAM_MMAP_BLOCK_FACTOR
00083   #ifdef _WIN32
00084    #define BTE_STREAM_MMAP_BLOCK_FACTOR 4
00085   #else
00086    #define BTE_STREAM_MMAP_BLOCK_FACTOR 512
00087   #endif
00088  #endif
00089 
00090 // Enable/disable TPIE read ahead; default is enabled (set to 1)
00091 //#define BTE_STREAM_MMAP_READ_AHEAD 1
00092 
00093 // read ahead method, ignored unless BTE_STREAM_MMAP_READ_AHEAD is set
00094 // to 1; if USE_LIBAIO is enabled, use asynchronous IO read ahead;
00095 // otherwise use use mmap-based read ahead; default is mmap-based read
00096 // ahead (USE_LIBAIO not defined)
00097 
00098 //#define USE_LIBAIO
00099 #endif
00100 
00101 
00102 // <><><><><><><><><><><><><><><><><><><><><><><><> //
00103 // <><> BTE_STREAM_UFS configuration options <><><> //
00104 // <><><><><><><><><><><><><><><><><><><><><><><><> //
00105 
00106 #ifdef BTE_STREAM_IMP_UFS
00107 // Define logical blocksize factor (default is 32)
00108  #ifndef BTE_STREAM_UFS_BLOCK_FACTOR
00109   #ifdef _WIN32
00110    #define BTE_STREAM_UFS_BLOCK_FACTOR 4
00111   #else
00112    #define BTE_STREAM_UFS_BLOCK_FACTOR 512
00113   #endif
00114  #endif
00115 
00116 // Enable/disable TPIE read ahead; default is disabled (set to 0)
00117  #define BTE_STREAM_UFS_READ_AHEAD 0
00118 // read ahead method, ignored unless BTE_STREAM_UFS_READ_AHEAD is set
00119 // to 1; if USE_LIBAIO is set to 1, use asynchronous IO read ahead;
00120 // otherwise no TPIE read ahead is done; default is disabled (set to 0)
00121  #define USE_LIBAIO 0
00122 #endif
00123 
00124 
00125 // <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> //
00126 //                   logging and assertions;                    //
00127 //            this should NOT be modified by user!!!            //
00128 //   in order to enable/disable library/application logging,    //
00129 //     run tpie configure script with appropriate options       //
00130 // <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> //
00131 
00132 // Use logs if requested.
00133 #if TP_LOG_APPS
00134  #define TPL_LOGGING 1
00135 #endif
00136 
00137 #include <tpie_log.h>
00138 
00139 // Enable assertions if requested.
00140 #if TP_ASSERT_APPS
00141  #define DEBUG_ASSERTIONS 1
00142 #endif
00143 
00144 #include <tpie_assert.h>
00145 
00146 #endif

Generated by  doxygen 1.7.1