Commit d01aa848 authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul

txn

git-svn-id: file:///svn/tokudb@254 c7de825b-a66e-492c-adef-691d508d4ae1
parent 66980275
......@@ -31,8 +31,10 @@ void print_struct (const char *structname, int need_internal, struct fieldinfo *
unsigned int current_64 = 0;
int dummy_counter=0;
int did_toku_internal=0;
// int total32 = fields32[N-1].size;
// int total64 = fields32[N-1].size;
printf("struct __toku_%s {\n", structname);
for (i=0; i<N; i++) {
for (i=0; i<N-1; i++) {
unsigned int this_32 = fields32[i].off;
unsigned int this_64 = fields64[i].off;
assert(strcmp(fields32[i].decl, fields64[i].decl)==0);
......@@ -86,6 +88,9 @@ int main (int argc __attribute__((__unused__)), char *argv[] __attribute__((__un
assert(sizeof(dbt_fields32)==sizeof(dbt_fields64));
print_struct("dbt", 0, dbt_fields32, dbt_fields64, sizeof(dbt_fields32)/sizeof(dbt_fields32[0]));
assert(sizeof(db_txn_fields32)==sizeof(db_txn_fields64));
print_struct("db_txn", 0, db_txn_fields32, db_txn_fields64, sizeof(db_txn_fields32)/sizeof(db_txn_fields32[0]));
printf("#if defined(__cplusplus)\n}\n#endif\n");
printf("#endif\n");
return 0;
......
......@@ -91,5 +91,6 @@ int main (int argc __attribute__((__unused__)), char *argv[] __attribute__((__un
fprintf(outf, "/* BDB offsets on a %d-bit machine */\n", __WORDSIZE);
sample_db_offsets();
sample_dbt_offsets();
sample_db_txn_offsets();
return 0;
}
......@@ -23,3 +23,8 @@ struct fieldinfo dbt_fields32[] = {
{"u_int32_t flags", 24, 4},
{0, 0, 28} /* size of whole struct */
};
struct fieldinfo db_txn_fields32[] = {
{"int (*commit) (DB_TXN*, u_int32_t)", 80, 4},
{"u_int32_t (*id) (DB_TXN *)", 88, 4},
{0, 0, 104} /* size of whole struct */
};
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