Commit 61eb7011 authored by Tollef Fog Heen's avatar Tollef Fog Heen

Merge r4171: 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/branches/2.0@4300 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent ce521b35
......@@ -111,8 +111,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