Skip to content

Commit

Permalink
freebsd kcmp call support.
Browse files Browse the repository at this point in the history
  • Loading branch information
devnexen committed Jun 9, 2024
1 parent acc7bb1 commit 757ba8b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/unix/bsd/freebsdlike/freebsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4803,6 +4803,12 @@ pub const TFD_CLOEXEC: ::c_int = O_CLOEXEC;
pub const TFD_TIMER_ABSTIME: ::c_int = 0x01;
pub const TFD_TIMER_CANCEL_ON_SET: ::c_int = 0x02;

pub const KCMP_FILE: ::c_int = 100;
pub const KCMP_FILEOBJ: ::c_int = 101;
pub const KCMP_FILES: ::c_int = 102;
pub const KCMP_SIGHAND: ::c_int = 103;
pub const KCMP_VM: ::c_int = 104;

pub const fn MAP_ALIGNED(a: ::c_int) -> ::c_int {
a << 24
}
Expand Down Expand Up @@ -5522,6 +5528,14 @@ extern "C" {
) -> ::c_int;
pub fn closefrom(lowfd: ::c_int);
pub fn close_range(lowfd: ::c_uint, highfd: ::c_uint, flags: ::c_int) -> ::c_int;

pub fn kcmp(
pid1: ::pid_t,
pid2: ::pid_t,
type_: ::c_int,
idx1: ::c_ulong,
idx2: ::c_ulong,
) -> ::c_int;
}

#[link(name = "memstat")]
Expand Down

0 comments on commit 757ba8b

Please sign in to comment.