From aea816dcaf352f66eb5cebb2a5c1e0c790b82d2a Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Sat, 24 Feb 2018 07:44:16 +0100 Subject: [PATCH] Fix data race --- m-snapshot.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/m-snapshot.h b/m-snapshot.h index 0a0fb4b0..c28f0a06 100644 --- a/m-snapshot.h +++ b/m-snapshot.h @@ -291,10 +291,10 @@ typedef struct snapshot_mrsw_int_s { genint_t freeList; } snapshot_mrsw_int_t[1]; +// can't check currentWrite due to potential data race on it #define SNAPSHOTI_MRSW_INT_CONTRACT(s) do { \ assert (s != NULL); \ assert (s->n > 0 && s->n <= SNAPSHOTI_MRSW_MAX_READER); \ - assert (s->currentWrite < s->n + SNAPSHOTI_MRSW_EXTRA_BUFFER); \ assert (SNAPSHOTI_MRSW_INT_FLAG_W(atomic_load(&s->lastNext)) \ <= s->n + SNAPSHOTI_MRSW_EXTRA_BUFFER); \ assert (s->cptTab != NULL); \