From d9d93565f3b401e0f6c16e18a892ecbdab0dbe51 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Mon, 2 Jun 2014 01:40:51 -0400 Subject: pool: Use relaxed atomic_store() instead of atomic_init(). atomic_init() emits an mfence for some reason. --- libdimension/pool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libdimension/pool.c b/libdimension/pool.c index c969bca..8973371 100644 --- a/libdimension/pool.c +++ b/libdimension/pool.c @@ -58,7 +58,7 @@ dmnsn_new_pool(void) { dmnsn_pool *pool = DMNSN_MALLOC(dmnsn_pool); dmnsn_key_create(&pool->thread_block, NULL); - atomic_init(&pool->chain, NULL); + atomic_store_explicit(&pool->chain, NULL, memory_order_relaxed); return pool; } -- cgit v1.2.3