-
Notifications
You must be signed in to change notification settings - Fork 713
Add MAP_SHARED_VALIDATE & MAP_SYNC #2499
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
Changes from 6 commits
2b3dd81
b1a3ab1
9820b6b
2eb2020
2eea141
de54509
eed2740
fff62ca
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Added `MAP_SHARED_VALIDATE` & `MAP_SYNC` for x86. | ||
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -41,6 +41,9 @@ libc_bitflags! { | |||||||||||
MAP_FILE; | ||||||||||||
/// Share this mapping. Mutually exclusive with `MAP_PRIVATE`. | ||||||||||||
MAP_SHARED; | ||||||||||||
/// Force mmap to check and fail on unknown flags. This also enables `MAP_SYNC`. | ||||||||||||
#[cfg(all(any(target_arch = "x86"), not(linux_android), not(target_os = "hurd"), not(target_env = "uclibc"), not(freebsdlike)))] | ||||||||||||
|
/// Force mmap to check and fail on unknown flags. This also enables `MAP_SYNC`. | |
#[cfg(all(any(target_arch = "x86"), not(linux_android), not(target_os = "hurd"), not(target_env = "uclibc"), not(freebsdlike)))] | |
/// Force mmap to check and fail on unknown flags. This also enables `MAP_SYNC`. | |
#[cfg(target_os = "linux")] |
This flag is available on all the Linux targets.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This flag is not that lucky, uClibc does not have it, for the glibc and musl, seems that they all lack the support for the MIPS target, so this should work for now:
/// Do not write through the page caches, write directly to the file. Used for Direct Access (DAX) enabled file systems. | |
#[cfg(all(any(target_arch = "x86"), not(linux_android), not(target_os = "hurd"), not(target_env = "uclibc"), not(freebsdlike)))] | |
/// Do not write through the page caches, write directly to the file. Used for Direct Access (DAX) enabled file systems. | |
// Available on Linux glibc and musl, MIPS* target excluded. | |
#[cfg(all(target_os = "linux", not(any(target_arch = "mips", target_arch = "mips64", target_arch = "mipsel", target_arch = "mips64el")), not(target_env = "uclibc")))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's great, thanks for the suggestions and apologies again for all the clutter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you apply the suggested changes, changelog should also be updated:)