Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Varnish: Dev

[PATCH 08/25] Add a condvar to struct vbo

 

 

Varnish dev RSS feed   Index | Next | Previous | View Threaded


martin at varnish-software

Jan 22, 2012, 9:53 AM

Post #1 of 1 (45 views)
Permalink
[PATCH 08/25] Add a condvar to struct vbo

---
bin/varnishd/cache/cache_busyobj.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/bin/varnishd/cache/cache_busyobj.c b/bin/varnishd/cache/cache_busyobj.c
index b8b6fd7..423df93 100644
--- a/bin/varnishd/cache/cache_busyobj.c
+++ b/bin/varnishd/cache/cache_busyobj.c
@@ -42,6 +42,7 @@ struct vbo {
unsigned magic;
#define VBO_MAGIC 0xde3d8223
struct lock mtx;
+ pthread_cond_t cond;
unsigned refcount;
uint16_t nhttp;
struct busyobj bo;
@@ -80,6 +81,7 @@ vbo_New(void)
vbo->magic = VBO_MAGIC;
vbo->nhttp = nhttp;
Lck_New(&vbo->mtx, lck_busyobj);
+ AZ(pthread_cond_init(&vbo->cond, NULL));
return (vbo);
}

@@ -94,6 +96,7 @@ VBO_Free(struct vbo **vbop)
CHECK_OBJ_NOTNULL(vbo, VBO_MAGIC);
AZ(vbo->refcount);
Lck_Delete(&vbo->mtx);
+ AZ(pthread_cond_destroy(&vbo->cond));
FREE_OBJ(vbo);
}

--
1.7.4.1


_______________________________________________
varnish-dev mailing list
varnish-dev [at] varnish-cache
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev

Varnish dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.