// Thread-Specific-Storage items for this backend
struct thread_tsd {
- DB_TXN *tid; /* Transaction handle */
- DBC *cursors[MAXCDB]; /* Cursors, for traversals... */
+ DB_TXN *tid; // Transaction handle
+ DBC *cursors[MAXCDB]; // Cursors, for traversals...
};
+
pthread_key_t bdb_thread_key;
#define TSD bdb_tsd()
+
// Return a pointer to our thread-specific (not session-specific) data.
struct thread_tsd *bdb_tsd(void) {
c = (struct thread_tsd *) malloc(sizeof(struct thread_tsd));
memset(c, 0, sizeof(struct thread_tsd));
pthread_setspecific(bdb_thread_key, (const void *) c);
- syslog(LOG_DEBUG, "\033[31mCREATED %lx\033[0m", (long unsigned int)c);
return(c);
}
syslog(LOG_INFO, "db: initialized Berkeley DB backend");
}
-
-