X-Git-Url: https://code.grnet.gr/git/archipelago/blobdiff_plain/6d486cc0e4c54f6224e7da47d84b319de3677542..ff5b1cbfde3f34e671723cb6f440819895734317:/xseg/xq/xq.c?ds=sidebyside diff --git a/xseg/xq/xq.c b/xseg/xq/xq.c index e0bba20..ed6df81 100644 --- a/xseg/xq/xq.c +++ b/xseg/xq/xq.c @@ -26,6 +26,7 @@ void xq_init_empty(struct xq *xq, xqindex size, void *mem) xq->tail = 0; PTRSET(xq, queue, mem); xq->size = __snap(size); + xq_release(&xq->lock); } void xq_init_map(struct xq *xq, @@ -41,6 +42,7 @@ void xq_init_map(struct xq *xq, xq->size = __snap(size); for (t = 0; t < count; t++) qmem[t] = mapfn(t); + xq_release(&xq->lock); } void xq_init_seq(struct xq *xq, xqindex size, xqindex count, void *mem) @@ -52,6 +54,7 @@ void xq_init_seq(struct xq *xq, xqindex size, xqindex count, void *mem) xq->size = __snap(size); for (t = 0; t < count; t++) qmem[t] = t; + xq_release(&xq->lock); } xqindex *xq_alloc_empty(struct xq *xq, xqindex size)