src/core/config.h File Reference

Runtime configuration. More...

#include <misc/result.h>
#include <misc/generic_types.h>

Go to the source code of this file.

Classes

struct  txc_runtime_settings_s

Defines

#define VALIDVAL0   {}
#define VALIDVAL2(val1, val2)   {val1, val2}
#define FOREACH_RUNTIME_CONFIG_OPTION(ACTION)
#define CONFIG_OPTION_ENTRY(name,type_name,store_type,parse_type,defvalue,validvalues,num_validvalues)   store_type name;
#define TXC_MAX_NUM_THREADS   32
#define TXC_ACTION_LIST_SIZE   32
#define TXC_SENTINEL_NUM   512
#define TXC_KOA_NUM   512
#define TXC_STATS_THREADSTAT_HASHTABLE_SIZE   512
#define TXC_SENTINEL_LIST_SIZE   32
#define TXC_KOA_MAP_SIZE   1024
#define TXC_KOA_CACHE_HASHTBL_SIZE   256
#define TXC_MAX_NUM_FDREFS_PER_KOA   8
#define TXC_MAX_LEN_PATHNAME   128
#define TXC_TX_REGULAR_COMMIT_ACTION_ORDER   0
#define TXC_TX_REGULAR_UNDO_ACTION_ORDER   0
#define TXC_KOA_CREATE_COMMIT_ACTION_ORDER   0
#define TXC_KOA_CREATE_UNDO_ACTION_ORDER   0
#define TXC_KOA_DESTROY_COMMIT_ACTION_ORDER   1
#define TXC_KOA_DESTROY_UNDO_ACTION_ORDER   1
#define TXC_SENTINELMGR_COMMIT_ACTION_ORDER   2
#define TXC_SENTINELMGR_UNDO_ACTION_ORDER   2
#define TXC_STATSMGR_COMMIT_ACTION_ORDER   3
#define TXC_STATSMGR_UNDO_ACTION_ORDER   3

Typedefs

typedef txc_runtime_settings_s txc_runtime_settings_t

Functions

txc_result_t txc_config_init ()
txc_result_t txc_config_set_option (char *option, char *value)

Variables

txc_runtime_settings_t txc_runtime_settings


Detailed Description

Runtime configuration.

Defines the runtime parameters. Simply extend FOREACH_RUNTIME_CONFIG_OPTION to add new runtime configuration parameters.

Definition in file config.h.


Define Documentation

#define FOREACH_RUNTIME_CONFIG_OPTION ( ACTION   ) 

Value:

ACTION(debug_all, boolean, txc_bool_t, char *, TXC_BOOL_FALSE,             \
         VALIDVAL2("enable", "disable"), 2)                                  \
  ACTION(debug_koa, boolean, txc_bool_t, char *, TXC_BOOL_FALSE,             \
         VALIDVAL2("enable", "disable"), 2)                                  \
  ACTION(debug_pool, boolean, txc_bool_t, char *, TXC_BOOL_FALSE,            \
         VALIDVAL2("enable", "disable"), 2)                                  \
  ACTION(debug_sentinel, boolean, txc_bool_t, char *, TXC_BOOL_FALSE,        \
         VALIDVAL2("enable", "disable"), 2)                                  \
  ACTION(debug_tx, boolean, txc_bool_t, char *, TXC_BOOL_FALSE,              \
         VALIDVAL2("enable", "disable"), 2)                                  \
  ACTION(debug_xcall, boolean, txc_bool_t, char *, TXC_BOOL_FALSE,           \
         VALIDVAL2("enable", "disable"), 2)                                  \
  ACTION(printconf, boolean, txc_bool_t, char *, TXC_BOOL_FALSE,             \
         VALIDVAL2("enable", "disable"), 2)                                  \
  ACTION(statistics, boolean, txc_bool_t, char *, TXC_BOOL_TRUE,             \
         VALIDVAL2("enable", "disable"), 2)                                  \
  ACTION(statistics_file, string, char *, char *, "txc.stats",               \
         VALIDVAL0, 0)                                                       \
  ACTION(sentinel_max_spin_retries, integer, int, int, 0,                    \
         VALIDVAL2(0, 1000), 2)                                              \
  ACTION(sentinel_max_backoff_time, integer, int, int, 0,                    \
         VALIDVAL2(0, 1000), 2)
Runtime configuration parameters.

Definition at line 28 of file config.h.

Referenced by txc_config_set_option().

#define TXC_ACTION_LIST_SIZE   32

Initial sizes of the per descriptor commit and undo action lists.

Definition at line 87 of file config.h.

Referenced by txc_txmgr_create().

#define TXC_KOA_CACHE_HASHTBL_SIZE   256

Size of the hash table used by the KOA cache.

Definition at line 105 of file config.h.

Referenced by txc_koamgr_create().

#define TXC_KOA_MAP_SIZE   1024

Maximum number of mapped file descriptors to KOA objects.

Definition at line 102 of file config.h.

Referenced by txc_koa_attach_fd(), txc_koa_detach_fd(), txc_koa_lookup_fd2koa(), and txc_koamgr_create().

#define TXC_KOA_NUM   512

Number of KOA objects

Definition at line 93 of file config.h.

Referenced by txc_koamgr_create().

#define TXC_MAX_LEN_PATHNAME   128

Maximum length of pathname

Definition at line 111 of file config.h.

#define TXC_MAX_NUM_FDREFS_PER_KOA   8

Maximum number of file descriptors referencing a KOA

Definition at line 108 of file config.h.

Referenced by txc_koa_attach_fd().

#define TXC_MAX_NUM_THREADS   32

Maximum number of threads/descriptors.

Definition at line 84 of file config.h.

Referenced by txc_txmgr_create().

#define TXC_SENTINEL_LIST_SIZE   32

Initial size of the per descriptor sentinel list.

Definition at line 99 of file config.h.

Referenced by txc_sentinel_list_create().

#define TXC_SENTINEL_NUM   512

Number of sentinels

Definition at line 90 of file config.h.

Referenced by txc_sentinelmgr_create().

#define TXC_STATS_THREADSTAT_HASHTABLE_SIZE   512

Size of the per thread stat hash table

Definition at line 96 of file config.h.

Referenced by txc_stats_print(), and txc_stats_threadstat_create().

#define TXC_TX_REGULAR_COMMIT_ACTION_ORDER   0

Commit and undo actions execution levels.

Definition at line 115 of file config.h.

Referenced by x_fsync(), x_pthread_create(), x_pthread_mutex_unlock(), x_sendmsg(), and x_write_pipe().


Generated on Wed Dec 9 20:32:40 2009 for xCalls by  doxygen 1.4.7