projects
/
onyx.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a7e923f
)
bugfix: `alloc.atomic` breaks when `core.sync` is not present
author
Brendan Hansen
<brendan.f.hansen@gmail.com>
Sun, 24 Sep 2023 22:22:38 +0000
(17:22 -0500)
committer
Brendan Hansen
<brendan.f.hansen@gmail.com>
Sun, 24 Sep 2023 22:22:38 +0000
(17:22 -0500)
core/alloc/atomic.onyx
patch
|
blob
|
history
diff --git
a/core/alloc/atomic.onyx
b/core/alloc/atomic.onyx
index ffa485c64440690b6edfd603f0bc76c9ebb426de..00bd6a3e94115a5fe7b2c6bbf81a6d5aa74a281c 100644
(file)
--- 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
}
+}