X-Git-Url: https://git.saurik.com/apple/libplatform.git/blobdiff_plain/ada7c4921d100a297d3be70d24c7fe9f43330c12..fedab5849c4fa8fc34212be16743dbfae89c71e4:/src/os/alloc_once.c?ds=sidebyside diff --git a/src/os/alloc_once.c b/src/os/alloc_once.c index a8ff358..e1ee7c5 100644 --- a/src/os/alloc_once.c +++ b/src/os/alloc_once.c @@ -27,6 +27,7 @@ */ #include "os/internal.h" +#include "resolver.h" #include "os/alloc_once_impl.h" #include #include @@ -42,7 +43,12 @@ typedef struct _os_alloc_heap_metadata_s { #define allocation_size (2 * vm_page_size) #define usable (allocation_size-sizeof(_os_alloc_heap_metadata_s)) -static void * volatile _os_alloc_heap; +OS_NOEXPORT void * volatile _os_alloc_heap; + +OS_ATOMIC_EXPORT void* _os_alloc_once(struct _os_alloc_once_s *slot, size_t sz, + os_function_t init); + +void * volatile _os_alloc_heap; /* * Simple allocator that doesn't have to worry about ever freeing allocations.