Commit 1840220c authored by Artur Bergman's avatar Artur Bergman

In Lck__Trylock we probably do want to try locks -- and check return value not errno

git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@4174 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 753cd3ce
......@@ -115,8 +115,8 @@ Lck__Trylock(struct lock *lck, const char *p, const char *f, int l)
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment