From: Brendan Hansen Date: Sun, 24 Sep 2023 22:22:38 +0000 (-0500) Subject: bugfix: `alloc.atomic` breaks when `core.sync` is not present X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=c824eda45d9c4b17f8bd67cf6ce7f74fbe1af8f2;p=onyx.git bugfix: `alloc.atomic` breaks when `core.sync` is not present --- 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 } +}