bugfix: `alloc.atomic` breaks when `core.sync` is not present
authorBrendan Hansen <brendan.f.hansen@gmail.com>
Sun, 24 Sep 2023 22:22:38 +0000 (17:22 -0500)
committerBrendan Hansen <brendan.f.hansen@gmail.com>
Sun, 24 Sep 2023 22:22:38 +0000 (17:22 -0500)
core/alloc/atomic.onyx

index ffa485c64440690b6edfd603f0bc76c9ebb426de..00bd6a3e94115a5fe7b2c6bbf81a6d5aa74a281c 100644 (file)
@@ -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
 }
 
 
+}