tried the following...

 

Index: context.c
===================================================================
--- context.c   (revision 8551)
+++ context.c   (working copy)
@@ -34,6 +34,7 @@
#include <sys/socket.h>
#include <syslog.h>
#include <sys/syslog.h>
+#include <sys/syscall.h>

#if TIME_WITH_SYS_TIME
# include <sys/time.h>
@@ -582,7 +583,14 @@
* Bind a thread to a context.  (It's inline merely to speed things up.)
*/
INLINE void become_session(CitContext *which_con) {
+
+       pid_t tid = syscall(SYS_gettid);
+
citthread_setspecific(MyConKey, (void *)which_con );
+       CtdlLogPrintf(CTDL_DEBUG, "[%d]: Now doing %s\n",
+                     (int) tid,
+                     ((which_con != NULL) && (which_con->ServiceName != NULL)) ?
+                     which_con->ServiceName:"");
}

 

but it doesn't seem as if tid holds the actual value of the thread, though other sources state this... Probably unportable anyways... merde

Reply via email to