r4174 - trunk/varnish-cache/bin/varnishd
sky at projects.linpro.no
sky at projects.linpro.no
Tue Aug 4 12:54:17 CEST 2009
Author: sky
Date: 2009-08-04 12:54:17 +0200 (Tue, 04 Aug 2009)
New Revision: 4174
Modified:
trunk/varnish-cache/bin/varnishd/cache_lck.c
Log:
In Lck__Trylock we probably do want to try locks -- and check return value not errno
Modified: trunk/varnish-cache/bin/varnishd/cache_lck.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_lck.c 2009-08-04 08:04:13 UTC (rev 4173)
+++ trunk/varnish-cache/bin/varnishd/cache_lck.c 2009-08-04 10:54:17 UTC (rev 4174)
@@ -115,8 +115,8 @@
int r;
CAST_OBJ_NOTNULL(ilck, lck->priv, ILCK_MAGIC);
- r = pthread_mutex_lock(&ilck->mtx);
- assert(r == 0 || errno == EBUSY);
+ r = pthread_mutex_trylock(&ilck->mtx);
+ assert(r == 0 || r == EBUSY);
if (params->diag_bitmap & 0x8)
VSL(SLT_Debug, 0,
"MTX_TRYLOCK(%s,%s,%d,%s) = %d", p, f, l, ilck->w);
More information about the varnish-commit
mailing list