r4300 - branches/2.0/varnish-cache/bin/varnishd
tfheen at projects.linpro.no
tfheen at projects.linpro.no
Thu Oct 8 15:17:00 CEST 2009
Author: tfheen
Date: 2009-10-08 15:17:00 +0200 (Thu, 08 Oct 2009)
New Revision: 4300
Modified:
branches/2.0/varnish-cache/bin/varnishd/cache_lck.c
Log:
Merge r4171: In Lck__Trylock we probably do want to try locks -- and check return value not errno
Modified: branches/2.0/varnish-cache/bin/varnishd/cache_lck.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/cache_lck.c 2009-10-08 13:13:14 UTC (rev 4299)
+++ branches/2.0/varnish-cache/bin/varnishd/cache_lck.c 2009-10-08 13:17:00 UTC (rev 4300)
@@ -111,8 +111,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