Skip to content

Commit

Permalink
netbsd ptrace sig/lwpinfo additions
Browse files Browse the repository at this point in the history
  • Loading branch information
devnexen committed Oct 30, 2021
1 parent 6058062 commit 802ad47
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libc-test/semver/netbsd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,9 @@ PIOD_READ_I
PIOD_WRITE_D
PIOD_WRITE_I
PIPE_BUF
PL_EVENT_NONE
PL_EVENT_SIGNAL
PL_EVENT_SUSPENDED
PM_STR
POLLRDBAND
POLLRDNORM
Expand Down Expand Up @@ -1323,6 +1326,8 @@ pthread_setaffinity_np
pthread_setname_np
ptrace
ptrace_io_desc
ptrace_lwpinfo
ptrace_siginfo
pututxline
pwritev
qsort
Expand Down
14 changes: 14 additions & 0 deletions src/unix/bsd/netbsdlike/netbsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,16 @@ s! {
#[cfg(libc_union)]
pub fae: *mut posix_spawn_file_actions_entry_t,
}

pub struct ptrace_lwpinfo {
pub pl_lwpid: lwpid_t,
pub pl_event: ::c_int,
}

pub struct ptrace_siginfo {
pub psi_siginfo: siginfo_t,
pub psi_lwpid: lwpid_t,
}
}

s_no_extra_traits! {
Expand Down Expand Up @@ -1598,6 +1608,10 @@ pub const TIME_ERROR: ::c_int = 5;
pub const LITTLE_ENDIAN: ::c_int = 1234;
pub const BIG_ENDIAN: ::c_int = 4321;

pub const PL_EVENT_NONE: ::c_int = 0;
pub const PL_EVENT_SIGNAL: ::c_int = 1;
pub const PL_EVENT_SUSPENDED: ::c_int = 2;

cfg_if! {
if #[cfg(any(target_arch = "sparc", target_arch = "sparc64",
target_arch = "x86", target_arch = "x86_64"))] {
Expand Down

0 comments on commit 802ad47

Please sign in to comment.