config REFACTOR built-in atomics implement memoery barrier
diff --git a/src/schema_compile.c b/src/schema_compile.c
index f8ee4b7..bef6229 100644
--- a/src/schema_compile.c
+++ b/src/schema_compile.c
@@ -1067,7 +1067,7 @@
         return ret;
     }
 
-    LY_ATOMIC_INC_RELAXED(((struct lysc_type *)storage->realtype)->refcount);
+    LY_ATOMIC_INC_BARRIER(((struct lysc_type *)storage->realtype)->refcount);
     return LY_SUCCESS;
 }