Added --with-threadlog. Use this if you want the thread table written to
[citadel.git] / citadel / include / ctdl_module.h
index 587adb4a81f007816e9f4e95f36501ef2da720fc..e979830e8506da47b2903ff33170a1070786e702 100644 (file)
@@ -118,5 +118,16 @@ struct CtdlThreadNode *CtdlThreadSelf(void);
 int CtdlThreadGetCount(void);
 void CtdlThreadGC(void);
 void CtdlThreadStopAll(void);
+#ifdef WITH_THREADLOG
+#define CtdlThreadPushName(NAME) \
+       char *_push_name; \
+       _push_name = CtdlThreadName(CtdlThreadSelf(), NAME)
+
+#define CtdlThreadPopName() \
+       free (CtdlThreadName(CtdlThreadSelf(), _push_name))
+#else
+#define CtdlThreadPushName(NAME)
+#define CtdlThreadPopName()
+#endif
 
 #endif /* CTDL_MODULE_H */