-
-/*
- * Transaction-based stuff. I'm writing this as I bake cookies...
- */
-
-void cdb_begin_transaction(void) {
-
- begin_critical_section(S_DATABASE);
-
- if (MYTID != NULL) { /* FIXME this slows it down, take it out */
- lprintf(1, "ERROR: thread %d is opening a new transaction with one already open!\n", getpid());
- }
- else {
- txn_begin(dbenv, NULL, &MYTID, 0);
- }
- end_critical_section(S_DATABASE);
-}
-
-void cdb_end_transaction(void) {
- begin_critical_section(S_DATABASE);
- if (MYTID == NULL) lprintf(1, "ERROR: txn_commit(NULL) !!\n");
- else txn_commit(MYTID, 0);
- MYTID = NULL; /* FIXME take out */
- end_critical_section(S_DATABASE);
-}