From 247338968dea83838caae6852363f7282ece558e Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Mon, 3 Jun 2024 09:23:33 -0400 Subject: sighook: Check that atomic size_t is lock-free --- src/sighook.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/sighook.c b/src/sighook.c index ece8147..3a7fb43 100644 --- a/src/sighook.c +++ b/src/sighook.c @@ -52,6 +52,8 @@ struct arc { /** Initialize an arc. */ static void arc_init(struct arc *arc) { + bfs_verify(atomic_is_lock_free(&arc->refs)); + atomic_init(&arc->refs, 0); arc->ptr = NULL; @@ -166,6 +168,8 @@ static void *RCU_NULL = &RCU_NULL; /** Initialize an RCU block. */ static void rcu_init(struct rcu *rcu) { + bfs_verify(atomic_is_lock_free(&rcu->active)); + atomic_init(&rcu->active, 0); arc_init(&rcu->slots[0]); arc_init(&rcu->slots[1]); -- cgit v1.2.3