From c824eda45d9c4b17f8bd67cf6ce7f74fbe1af8f2 Mon Sep 17 00:00:00 2001 From: Brendan Hansen Date: Sun, 24 Sep 2023 17:22:38 -0500 Subject: [PATCH] bugfix: `alloc.atomic` breaks when `core.sync` is not present --- core/alloc/atomic.onyx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/alloc/atomic.onyx b/core/alloc/atomic.onyx index ffa485c6..00bd6a3e 100644 --- a/core/alloc/atomic.onyx +++ b/core/alloc/atomic.onyx @@ -1,5 +1,8 @@ package core.alloc.atomic +// This can only be used when the core.sync package exists. +#if #defined(package core.sync) { + // // AtomicAllocator wraps another allocator in a mutex, // ensuring that every allocation is thread-safe. This @@ -36,3 +39,4 @@ atomic_alloc :: (atomic: &AtomicAllocator, aa: AllocationAction, size: u32, alig } +} -- 2.25.1