Commit 2ed155ab authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul

Rename a bunch of symbols to toku_symbols. Addresses #8.

git-svn-id: file:///svn/tokudb@822 c7de825b-a66e-492c-adef-691d508d4ae1
parent 621b1d2f
......@@ -33,7 +33,7 @@ BRT t;
void setup (void) {
int r;
unlink(fname);
r = brt_create_cachetable(&ct, 0, ZERO_LSN, NULL_LOGGER); assert(r==0);
r = toku_brt_create_cachetable(&ct, 0, ZERO_LSN, NULL_LOGGER); assert(r==0);
r = open_brt(fname, 0, 1, &t, nodesize, ct, NULL_TXN, toku_default_compare_fun, (DB*)0); assert(r==0);
}
......
......@@ -147,33 +147,33 @@ struct brt_cursor {
};
/* print the cursor path */
void brt_cursor_print(BRT_CURSOR cursor);
void toku_brt_cursor_print(BRT_CURSOR cursor);
/* is the cursor path empty? */
static inline int brt_cursor_path_empty(BRT_CURSOR cursor) {
static inline int toku_brt_cursor_path_empty(BRT_CURSOR cursor) {
return cursor->path_len == 0;
}
/*is the cursor path full? */
static inline int brt_cursor_path_full(BRT_CURSOR cursor) {
static inline int toku_brt_cursor_path_full(BRT_CURSOR cursor) {
return cursor->path_len == CURSOR_PATHLEN_LIMIT;
}
static inline int brt_cursor_active(BRT_CURSOR cursor) {
static inline int toku_brt_cursor_active(BRT_CURSOR cursor) {
return cursor->path_len > 0;
}
/* brt has a new root. add the root to this cursor. */
void brt_cursor_new_root(BRT_CURSOR cursor, BRT t, BRTNODE newroot, BRTNODE left, BRTNODE right);
void toku_brt_cursor_new_root(BRT_CURSOR cursor, BRT t, BRTNODE newroot, BRTNODE left, BRTNODE right);
/* a brt leaf has split. modify this cursor if it includes the old node in its path. */
void brt_cursor_leaf_split(BRT_CURSOR cursor, BRT t, BRTNODE oldnode, BRTNODE left, BRTNODE right);
void toku_brt_cursor_leaf_split(BRT_CURSOR cursor, BRT t, BRTNODE oldnode, BRTNODE left, BRTNODE right);
/* a brt internal node has expanded. modify this cursor if it includes the old node in its path. */
void brt_cursor_nonleaf_expand(BRT_CURSOR cursor, BRT t, BRTNODE oldnode, int childnum, BRTNODE left, BRTNODE right);
void toku_brt_cursor_nonleaf_expand(BRT_CURSOR cursor, BRT t, BRTNODE oldnode, int childnum, BRTNODE left, BRTNODE right);
/* a brt internal node has split. modify this cursor if it includes the old node in its path. */
void brt_cursor_nonleaf_split(BRT_CURSOR cursor, BRT t, BRTNODE oldnode, BRTNODE left, BRTNODE right);
void toku_brt_cursor_nonleaf_split(BRT_CURSOR cursor, BRT t, BRTNODE oldnode, BRTNODE left, BRTNODE right);
void brt_update_cursors_new_root(BRT t, BRTNODE newroot, BRTNODE left, BRTNODE right);
void brt_update_cursors_leaf_split(BRT t, BRTNODE oldnode, BRTNODE left, BRTNODE right);
......
This diff is collapsed.
This diff is collapsed.
......@@ -13,7 +13,7 @@
int open_brt (const char *fname, const char *dbname, int is_create, BRT *, int nodesize, CACHETABLE, TOKUTXN, int(*)(DB*,const DBT*,const DBT*), DB*);
int brt_create(BRT *);
int toku_brt_create(BRT *);
int brt_set_flags(BRT, int flags);
int brt_get_flags(BRT, int *flags);
int brt_set_nodesize(BRT, int nodesize);
......@@ -36,18 +36,18 @@ void brt_flush (BRT); /* fsync and clear the caches. */
cachesize is the upper limit on the size of the size of the values in the table
pass 0 if you want the default */
int brt_create_cachetable(CACHETABLE *t, long cachesize, LSN initial_lsn, TOKULOGGER);
int toku_brt_create_cachetable(CACHETABLE *t, long cachesize, LSN initial_lsn, TOKULOGGER);
extern int brt_debug_mode;
extern int toku_brt_debug_mode;
int toku_verify_brt (BRT brt);
//int show_brt_blocknumbers(BRT);
typedef struct brt_cursor *BRT_CURSOR;
int brt_cursor (BRT, BRT_CURSOR*);
int brt_cursor_get (BRT_CURSOR cursor, DBT *kbt, DBT *vbt, int brtc_flags, TOKUTXN);
int brt_cursor_delete(BRT_CURSOR cursor, int flags);
int brt_cursor_close (BRT_CURSOR curs);
int toku_brt_cursor (BRT, BRT_CURSOR*);
int toku_brt_cursor_get (BRT_CURSOR cursor, DBT *kbt, DBT *vbt, int brtc_flags, TOKUTXN);
int toku_brt_cursor_delete(BRT_CURSOR cursor, int flags);
int toku_brt_cursor_close (BRT_CURSOR curs);
typedef struct brtenv *BRTENV;
int brtenv_checkpoint (BRTENV env);
......
......@@ -279,7 +279,7 @@ static int toku_db_env_open(DB_ENV * env, const char *home, u_int32_t flags, int
}
}
r = brt_create_cachetable(&env->i->cachetable, env->i->cachetable_size, ZERO_LSN, env->i->logger);
r = toku_brt_create_cachetable(&env->i->cachetable, env->i->cachetable_size, ZERO_LSN, env->i->logger);
if (r!=0) goto died2;
return 0;
}
......@@ -522,19 +522,19 @@ struct __toku_dbc_internal {
};
static int toku_c_get(DBC * c, DBT * key, DBT * data, u_int32_t flag) {
int r = brt_cursor_get(c->i->c, key, data, flag, c->i->txn ? c->i->txn->i->tokutxn : 0);
int r = toku_brt_cursor_get(c->i->c, key, data, flag, c->i->txn ? c->i->txn->i->tokutxn : 0);
return r;
}
static int toku_c_close(DBC * c) {
int r = brt_cursor_close(c->i->c);
int r = toku_brt_cursor_close(c->i->c);
toku_free(c->i);
toku_free(c);
return r;
}
static int toku_c_del(DBC * c, u_int32_t flags) {
int r = brt_cursor_delete(c->i->c, flags);
int r = toku_brt_cursor_delete(c->i->c, flags);
return r;
}
......@@ -550,7 +550,7 @@ static int toku_db_cursor(DB * db, DB_TXN * txn, DBC ** c, u_int32_t flags) {
assert(result->i);
result->i->db = db;
result->i->txn = txn;
int r = brt_cursor(db->i->brt, &result->i->c);
int r = toku_brt_cursor(db->i->brt, &result->i->c);
assert(r == 0);
*c = result;
return 0;
......@@ -845,7 +845,7 @@ int db_create(DB ** db, DB_ENV * env, u_int32_t flags) {
list_init(&result->i->associated);
result->i->primary = 0;
result->i->associate_callback = 0;
r = brt_create(&result->i->brt);
r = toku_brt_create(&result->i->brt);
if (r != 0) {
toku_free(result->i);
toku_free(result);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment