]> code.citadel.org Git - citadel.git/blobdiff - citadel/server/threads.h
This works much better. TSD maintained in-module instead of globally.
[citadel.git] / citadel / server / threads.h
index 33b854ea9cbee84d8ce5dc67f28734ae7f754f1c..e55aa394c2642afa8ddacff793b5c519a192dbc7 100644 (file)
 
 #include <sys/time.h>
 #include <string.h>
-
-#include <db.h>
-
 #include "server.h"
 #include "sysdep_decls.h"
 
-/*
- * Things we need to keep track of per-thread instead of per-session
- */
-struct thread_tsd {
-       DB_TXN *tid;            /* Transaction handle */
-       DBC *cursors[MAXCDB];   /* Cursors, for traversals... */
-};
-
-extern pthread_key_t ThreadKey;
-extern struct thread_tsd masterTSD;
-#define TSD MyThread()
-
 extern int num_workers;
 extern int active_workers;
 extern int server_shutting_down;
 
-struct thread_tsd *MyThread(void);
 int try_critical_section (int which_one);
 void begin_critical_section (int which_one);
 void end_critical_section (int which_one);
@@ -40,7 +24,6 @@ void go_threading(void);
 void InitializeMasterTSD(void);
 void CtdlThreadCreate(void *(*start_routine)(void*));
 
-
 extern pthread_mutex_t ThreadCountMutex;;
 
 #endif // THREADS_H