diff options
author | David CARLIER <devnexen@gmail.com> | 2021-06-19 08:12:41 +0100 |
---|---|---|
committer | David CARLIER <devnexen@gmail.com> | 2021-06-19 08:12:41 +0100 |
commit | c27981a80c88485fb4d453318987b4322da59a44 (patch) | |
tree | 97194aa68835e4b88a53c1225d1007dff18fdefa | |
parent | 111e9fe6584213692d0e2197c69d08c55c9f37d3 (diff) | |
download | rust-libc-c27981a80c88485fb4d453318987b4322da59a44.tar.gz |
apple add mem tag macro
-rw-r--r-- | libc-test/semver/apple.txt | 1 | ||||
-rw-r--r-- | src/unix/bsd/apple/mod.rs | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/libc-test/semver/apple.txt b/libc-test/semver/apple.txt index 5fdd2c45c1..a660486456 100644 --- a/libc-test/semver/apple.txt +++ b/libc-test/semver/apple.txt @@ -1332,6 +1332,7 @@ VM_FLAGS_USER_MAP VM_FLAGS_USER_REMAP VM_LOADAVG VM_MACHFACTOR +VM_MAKE_TAG VM_MAXID VM_MEMORY_ACCELERATE VM_MEMORY_ANALYSIS_TOOL diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs index 850d138f27..722dadebc8 100644 --- a/src/unix/bsd/apple/mod.rs +++ b/src/unix/bsd/apple/mod.rs @@ -3590,6 +3590,10 @@ f! { (__DARWIN_ALIGN32(::mem::size_of::<::cmsghdr>()) + length as usize) as ::c_uint } + + pub {const} fn VM_MAKE_TAG(id: u8) -> u32 { + (id as u32) << 24u32 + } } safe_f! { |