Initialize TSD key earlier in the startup process. Newer Linux/Linux distributions...
[citadel.git] / citadel / threads.h
index 2119e02395ce816186c59359f81c169ec44318f7..5540d27a83568efd99076ab21c8cbcc7eaaa46e8 100644 (file)
 #include <sys/time.h>
 #include <string.h>
 
-#ifdef HAVE_DB_H
 #include <db.h>
-#elif defined(HAVE_DB4_DB_H)
-#include <db4/db.h>
-#else
-#error Neither <db.h> nor <db4/db.h> was found by configure. Install db4-devel.
-#endif
 
 #include "server.h"
 #include "sysdep_decls.h"
@@ -30,6 +24,7 @@ struct thread_tsd {
        DBC *cursors[MAXCDB];   /* Cursors, for traversals... */
 };
 
+pthread_key_t ThreadKey;
 extern struct thread_tsd masterTSD;
 #define TSD MyThread()
 
@@ -45,4 +40,7 @@ void go_threading(void);
 void InitializeMasterTSD(void);
 void CtdlThreadCreate(void *(*start_routine)(void*));
 
+
+extern pthread_mutex_t ThreadCountMutex;;
+
 #endif // THREADS_H