4 * checkpointing module for the database
14 #include <sys/types.h>
20 #elif defined(HAVE_DB4_DB_H)
23 #error Neither <db.h> nor <db4/db.h> was found by configure. Install db4-devel.
27 #if DB_VERSION_MAJOR < 4 || DB_VERSION_MINOR < 1
28 #error Citadel requires Berkeley DB v4.1 or newer. Please upgrade.
31 #include <libcitadel.h>
35 #include "citserver.h"
38 #include "sysdep_decls.h"
42 #include "ctdl_module.h"
45 * Main loop for the checkpoint thread.
47 void *checkpoint_thread(void *arg) {
48 struct CitContext checkpointCC;
50 CtdlLogPrintf(CTDL_DEBUG, "checkpoint_thread() initializing\n");
52 CtdlFillSystemContext(&checkpointCC, "checkpoint");
53 citthread_setspecific(MyConKey, (void *)&checkpointCC );
55 while (!CtdlThreadCheckStop()) {
60 CtdlLogPrintf(CTDL_DEBUG, "checkpoint_thread() exiting\n");
65 CTDL_MODULE_INIT(checkpoint) {
68 CtdlThreadCreate ("checkpoint", CTDLTHREAD_BIGSTACK, checkpoint_thread, NULL);
70 /* return our Subversion id for the Log */