]> code.citadel.org Git - citadel.git/blobdiff - citadel/include/ctdl_module.h
Abstracted pthread from threads.* into sysdep_decls.h to ease porting.
[citadel.git] / citadel / include / ctdl_module.h
index 932e0fe387428c71341190cc6745174ca928014c..e5a544b73365ad9e73cb61311c1f59a3c192ffcf 100644 (file)
@@ -6,7 +6,7 @@
 #include "server.h"
 #include "sysdep_decls.h"
 #include "msgbase.h"
-
+#include "threads.h"
 /*
  * define macros for module init stuff
  */
@@ -117,7 +117,7 @@ struct CtdlThreadNode *CtdlThreadSchedule(char *name, long flags, void *(*thread
 void CtdlThreadSleep(int secs);
 void CtdlThreadStop(struct CtdlThreadNode *thread);
 int CtdlThreadCheckStop(void);
-void CtdlThreadCancel(struct CtdlThreadNode *thread);
+/* void CtdlThreadCancel2(struct CtdlThreadNode *thread); Leave this out, it should never be needed */
 const char *CtdlThreadName(const char *name);
 struct CtdlThreadNode *CtdlThreadSelf(void);
 int CtdlThreadGetCount(void);
@@ -126,9 +126,12 @@ double CtdlThreadGetWorkerAvg(void);
 double CtdlThreadGetLoadAvg(void);
 void CtdlThreadGC(void);
 void CtdlThreadStopAll(void);
-int CtdlThreadSelect(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout, struct CtdlThreadNode *self);
+int CtdlThreadSelect(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout);
 void CtdlThreadAllocTSD(void);
 
+#define CTDLTHREAD_BIGSTACK    0x0001
+#define CTDLTHREAD_WORKER      0x0002
+
 /* Macros to speed up getting outr thread */
 
 #define MYCURSORS      (((ThreadTSD*)pthread_getspecific(ThreadKey))->cursors)