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.
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 memset(&checkpointCC, 0, sizeof(struct CitContext));
53 checkpointCC.internal_pgm = 1;
54 checkpointCC.cs_pid = 0;
55 pthread_setspecific(MyConKey, (void *)&checkpointCC );
57 while (!CtdlThreadCheckStop()) {
62 CtdlLogPrintf(CTDL_DEBUG, "checkpoint_thread() exiting\n");
67 CTDL_MODULE_INIT(checkpoint) {
70 CtdlThreadCreate ("checkpoint", CTDLTHREAD_BIGSTACK, checkpoint_thread, NULL);
72 /* return our Subversion id for the Log */
73 return "$Id: serv_autocompletion.c 5756 2007-11-16 17:15:22Z ajc $";