Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change shm_open() calling ABI on aarch64 Darwin #43516

Merged
merged 1 commit into from
Dec 31, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions stdlib/SharedArrays/src/SharedArrays.jl
Original file line number Diff line number Diff line change
Expand Up @@ -693,9 +693,15 @@ function _shm_mmap_array(T, dims, shm_seg_name, mode)
end

shm_unlink(shm_seg_name) = ccall(:shm_unlink, Cint, (Cstring,), shm_seg_name)
shm_open(shm_seg_name, oflags, permissions) = ccall(:shm_open, Cint,
(Cstring, Cint, Base.Cmode_t), shm_seg_name, oflags, permissions)

function shm_open(shm_seg_name, oflags, permissions)
# On macOS, `shm_open()` is a variadic function, so to properly match
# calling ABI, we must declare our arguments as variadic as well.
@static if Sys.isapple()
return ccall(:shm_open, Cint, (Cstring, Cint, Base.Cmode_t...), shm_seg_name, oflags, permissions)
else
return ccall(:shm_open, Cint, (Cstring, Cint, Base.Cmode_t), shm_seg_name, oflags, permissions)
end
end
end # os-test

end # module