Commit 535cc8e0 authored by Artur Bergman's avatar Artur Bergman

pthread_mutex_trylock doesn't actually set errno

http://www.opengroup.org/onlinepubs/000095399/functions/pthread_mutex_lock.html

"The pthread_mutex_trylock() function shall return zero if a lock on the mutex object referenced by mutex is acquired. Otherwise, an error number is returned to indicate the error."



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@4168 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 2f636a6e
......@@ -82,7 +82,7 @@ Lck__Lock(struct lock *lck, const char *p, const char *f, int l)
return;
}
r = pthread_mutex_trylock(&ilck->mtx);
assert(r == 0 || errno == EBUSY);
assert(r == 0 || r == EBUSY);
if (r) {
VSL(SLT_Debug, 0, "MTX_CONTEST(%s,%s,%d,%s)", p, f, l, ilck->w);
AZ(pthread_mutex_lock(&ilck->mtx));
......
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