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"
40 #include "ctdl_module.h"
43 * Main loop for the checkpoint thread.
45 void *checkpoint_thread(void *arg) {
46 struct CitContext checkpointCC;
48 CtdlLogPrintf(CTDL_DEBUG, "checkpoint_thread() initializing\n");
50 memset(&checkpointCC, 0, sizeof(struct CitContext));
51 checkpointCC.internal_pgm = 1;
52 checkpointCC.cs_pid = 0;
53 pthread_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 */
71 return "$Id: serv_autocompletion.c 5756 2007-11-16 17:15:22Z ajc $";