Skip to content

dragonflybsd adding vmspace data. #2798

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

Merged
merged 1 commit into from
May 24, 2022
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions libc-test/semver/dragonfly.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1524,6 +1524,7 @@ uuid
uuid_t
vm_map_entry_t
vm_size_t
vmspace
wait4
waitid
xucred
31 changes: 31 additions & 0 deletions src/unix/bsd/freebsdlike/dragonfly/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ pub type vm_eflags_t = ::c_uint;
pub type vm_map_t = *mut __c_anonymous_vm_map;
pub type vm_map_entry_t = *mut vm_map_entry;

pub type pmap = __c_anonymous_pmap;

#[cfg_attr(feature = "extra_traits", derive(Debug))]
pub enum sem {}
impl ::Copy for sem {}
Expand Down Expand Up @@ -360,6 +362,35 @@ s! {
pub id: ::vm_subsys_t,
}

pub struct __c_anonymous_pmap {
_priv1: [::uintptr_t; 32],
_priv2: [::uintptr_t; 32],
_priv3: [::uintptr_t; 32],
_priv4: [::uintptr_t; 32],
_priv5: [::uintptr_t; 8],
}

pub struct vmspace {
vm_map: __c_anonymous_vm_map,
vm_pmap: __c_anonymous_pmap,
pub vm_flags: ::c_int,
pub vm_shm: *mut ::c_char,
pub vm_rssize: ::segsz_t,
pub vm_swrss: ::segsz_t,
pub vm_tsize: ::segsz_t,
pub vm_dsize: ::segsz_t,
pub vm_ssize: ::segsz_t,
pub vm_taddr: *mut ::c_char,
pub vm_daddr: *mut ::c_char,
pub vm_maxsaddr: *mut ::c_char,
pub vm_minsaddr: *mut ::c_char,
_unused1: ::c_int,
_unused2: ::c_int,
pub vm_pagesupply: ::c_int,
pub vm_holdcnt: ::c_uint,
pub vm_refcnt: ::c_uint,
}

pub struct cpuctl_msr_args_t {
pub msr: ::c_int,
pub data: u64,
Expand Down