Skip to content

Commit

Permalink
Auto merge of #2493 - devnexen:fbsd_lwpinfo, r=Amanieu
Browse files Browse the repository at this point in the history
freebsd add ptrace_lwpinfo struct
  • Loading branch information
bors committed Oct 30, 2021
2 parents e69f0c1 + ad6e1be commit 09fdbcc
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
14 changes: 14 additions & 0 deletions libc-test/semver/freebsd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,19 @@ PIOD_READ_I
PIOD_WRITE_D
PIOD_WRITE_I
PIPE_BUF
PL_EVENT_NONE
PL_EVENT_SIGNAL
PL_FLAG_BORN
PL_FLAG_BOUND
PL_FLAG_CHILD
PL_FLAG_EXEC
PL_FLAG_EXITED
PL_FLAG_VFORKED
PL_FLAG_VFORK_DONE
PL_FLAG_SA
PL_FLAG_SCE
PL_FLAG_SCX
PL_FLAG_SI
PM_STR
POLLINIGNEOF
POLLRDBAND
Expand Down Expand Up @@ -1675,6 +1688,7 @@ pthread_spin_unlock
pthread_spinlock_t
ptrace
ptrace_io_desc
ptrace_lwpinfo
ptrace_vm_entry
pututxline
pwritev
Expand Down
28 changes: 28 additions & 0 deletions src/unix/bsd/freebsdlike/freebsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,19 @@ s! {
pub pve_path: *mut ::c_char,
}

pub struct ptrace_lwpinfo {
pub pl_lwpid: lwpid_t,
pub pl_event: ::c_int,
pub pl_flags: ::c_int,
pub pl_sigmask: ::sigset_t,
pub pl_siglist: ::sigset_t,
pub pl_siginfo: ::siginfo_t,
pub pl_tdname: [::c_char; ::MAXCOMLEN as usize + 1],
pub pl_child_pid: ::pid_t,
pub pl_syscall_code: ::c_uint,
pub pl_syscall_narg: ::c_uint,
}

pub struct cpuset_t {
#[cfg(target_pointer_width = "64")]
__bits: [::c_long; 4],
Expand Down Expand Up @@ -1097,6 +1110,21 @@ pub const LOCAL_CREDS_PERSISTENT: ::c_int = 3;
pub const LOCAL_CONNWAIT: ::c_int = 4;
pub const LOCAL_VENDOR: ::c_int = SO_VENDOR;

pub const PL_EVENT_NONE: ::c_int = 0;
pub const PL_EVENT_SIGNAL: ::c_int = 1;
pub const PL_FLAG_SA: ::c_int = 0x01;
pub const PL_FLAG_BOUND: ::c_int = 0x02;
pub const PL_FLAG_SCE: ::c_int = 0x04;
pub const PL_FLAG_SCX: ::c_int = 0x08;
pub const PL_FLAG_EXEC: ::c_int = 0x10;
pub const PL_FLAG_SI: ::c_int = 0x20;
pub const PL_FLAG_FORKED: ::c_int = 0x40;
pub const PL_FLAG_CHILD: ::c_int = 0x80;
pub const PL_FLAG_BORN: ::c_int = 0x100;
pub const PL_FLAG_EXITED: ::c_int = 0x200;
pub const PL_FLAG_VFORKED: ::c_int = 0x400;
pub const PL_FLAG_VFORK_DONE: ::c_int = 0x800;

pub const PT_LWPINFO: ::c_int = 13;
pub const PT_GETNUMLWPS: ::c_int = 14;
pub const PT_GETLWPLIST: ::c_int = 15;
Expand Down

0 comments on commit 09fdbcc

Please sign in to comment.