[master] 8c66705 When changing the busyobj we should use broadcast so everybody hears.
Poul-Henning Kamp
phk at FreeBSD.org
Mon Feb 17 17:20:45 CET 2014
commit 8c6670580d04f02016b9302445bc97cb6ed1a14d
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon Feb 17 16:20:00 2014 +0000
When changing the busyobj we should use broadcast so everybody hears.
Spotted by: gquintard
diff --git a/bin/varnishd/cache/cache_busyobj.c b/bin/varnishd/cache/cache_busyobj.c
index 65a24bf..d6b43ae 100644
--- a/bin/varnishd/cache/cache_busyobj.c
+++ b/bin/varnishd/cache/cache_busyobj.c
@@ -222,7 +222,7 @@ VBO_extend(struct busyobj *bo, ssize_t l)
CHECK_OBJ_NOTNULL(st, STORAGE_MAGIC);
st->len += l;
bo->fetch_obj->len += l;
- AZ(pthread_cond_signal(&bo->cond));
+ AZ(pthread_cond_broadcast(&bo->cond));
Lck_Unlock(&bo->mtx);
}
@@ -248,7 +248,7 @@ VBO_setstate(struct busyobj *bo, enum busyobj_state_e next)
VSLb(bo->vsl, SLT_Debug, "XXX BOS: %d -> %d", bo->state, next);
assert(next > bo->state);
bo->state = next;
- AZ(pthread_cond_signal(&bo->cond));
+ AZ(pthread_cond_broadcast(&bo->cond));
Lck_Unlock(&bo->mtx);
}
More information about the varnish-commit
mailing list