[experimental-ims] 3eea8da Use sp->vsl_id as thread identifier
    Geoff Simmons 
    geoff at varnish-cache.org
       
    Mon Jan 16 17:58:31 CET 2012
    
    
  
commit 3eea8dacc142df1b2c460b80113c8171c214f5f5
Author: Rogier 'DocWilco' Mulhuijzen <github at bsdchicks.com>
Date:   Sun Jan 15 16:39:42 2012 +0100
    Use sp->vsl_id as thread identifier
    
    POSIX threads don't have a thread identifier that can be printed
    in a portable manner.
diff --git a/bin/varnishd/cache/cache_center.c b/bin/varnishd/cache/cache_center.c
index 4967c82..69e854e 100644
--- a/bin/varnishd/cache/cache_center.c
+++ b/bin/varnishd/cache/cache_center.c
@@ -1655,13 +1655,13 @@ cnt_diag(struct sess *sp, const char *state)
 	}
 
 	if (sp->wrk != NULL) {
-		WSP(sp, SLT_Debug, "thr %p STP_%s sp %p obj %p vcl %p",
-		    pthread_self(), state, sp, obj, vcl);
+		WSP(sp, SLT_Debug, "vsl_id %u STP_%s sp %p obj %p vcl %p",
+		    sp->vsl_id, state, sp, obj, vcl);
 		WSL_Flush(sp->wrk, 0);
 	} else {
 		VSL(SLT_Debug, sp->vsl_id,
-		    "thr %p STP_%s sp %p obj %p vcl %p",
-		    pthread_self(), state, sp, obj, vcl);
+		    "vsl_id %u STP_%s sp %p obj %p vcl %p",
+		    sp->vsl_id, state, sp, obj, vcl);
 	}
 }
 
    
    
More information about the varnish-commit
mailing list