2 * $Id: serv_checkpoint.c 5756 2007-11-16 17:15:22Z ajc $
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.
33 #include "citserver.h"
36 #include "sysdep_decls.h"
39 #include "ctdl_module.h"
42 * Main loop for the checkpoint thread.
44 void *checkpoint_thread(void *arg) {
45 struct CitContext checkpointCC;
49 CtdlLogPrintf(CTDL_DEBUG, "checkpoint_thread() initializing\n");
51 memset(&checkpointCC, 0, sizeof(struct CitContext));
52 checkpointCC.internal_pgm = 1;
53 checkpointCC.cs_pid = 0;
54 pthread_setspecific(MyConKey, (void *)&checkpointCC );
56 while (!CtdlThreadCheckStop()) {
61 CtdlLogPrintf(CTDL_DEBUG, "checkpoint_thread() exiting\n");
66 CTDL_MODULE_INIT(checkpoint) {
69 CtdlThreadCreate ("checkpoint", CTDLTHREAD_BIGSTACK, checkpoint_thread, NULL);
71 /* return our Subversion id for the Log */
72 return "$Id: serv_autocompletion.c 5756 2007-11-16 17:15:22Z ajc $";