Skip to content

Commit 09fdbcc

Browse files
committed
Auto merge of #2493 - devnexen:fbsd_lwpinfo, r=Amanieu
freebsd add ptrace_lwpinfo struct
2 parents e69f0c1 + ad6e1be commit 09fdbcc

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

libc-test/semver/freebsd.txt

+14
Original file line numberDiff line numberDiff line change
@@ -837,6 +837,19 @@ PIOD_READ_I
837837
PIOD_WRITE_D
838838
PIOD_WRITE_I
839839
PIPE_BUF
840+
PL_EVENT_NONE
841+
PL_EVENT_SIGNAL
842+
PL_FLAG_BORN
843+
PL_FLAG_BOUND
844+
PL_FLAG_CHILD
845+
PL_FLAG_EXEC
846+
PL_FLAG_EXITED
847+
PL_FLAG_VFORKED
848+
PL_FLAG_VFORK_DONE
849+
PL_FLAG_SA
850+
PL_FLAG_SCE
851+
PL_FLAG_SCX
852+
PL_FLAG_SI
840853
PM_STR
841854
POLLINIGNEOF
842855
POLLRDBAND
@@ -1675,6 +1688,7 @@ pthread_spin_unlock
16751688
pthread_spinlock_t
16761689
ptrace
16771690
ptrace_io_desc
1691+
ptrace_lwpinfo
16781692
ptrace_vm_entry
16791693
pututxline
16801694
pwritev

src/unix/bsd/freebsdlike/freebsd/mod.rs

+28
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,19 @@ s! {
140140
pub pve_path: *mut ::c_char,
141141
}
142142

143+
pub struct ptrace_lwpinfo {
144+
pub pl_lwpid: lwpid_t,
145+
pub pl_event: ::c_int,
146+
pub pl_flags: ::c_int,
147+
pub pl_sigmask: ::sigset_t,
148+
pub pl_siglist: ::sigset_t,
149+
pub pl_siginfo: ::siginfo_t,
150+
pub pl_tdname: [::c_char; ::MAXCOMLEN as usize + 1],
151+
pub pl_child_pid: ::pid_t,
152+
pub pl_syscall_code: ::c_uint,
153+
pub pl_syscall_narg: ::c_uint,
154+
}
155+
143156
pub struct cpuset_t {
144157
#[cfg(target_pointer_width = "64")]
145158
__bits: [::c_long; 4],
@@ -1097,6 +1110,21 @@ pub const LOCAL_CREDS_PERSISTENT: ::c_int = 3;
10971110
pub const LOCAL_CONNWAIT: ::c_int = 4;
10981111
pub const LOCAL_VENDOR: ::c_int = SO_VENDOR;
10991112

1113+
pub const PL_EVENT_NONE: ::c_int = 0;
1114+
pub const PL_EVENT_SIGNAL: ::c_int = 1;
1115+
pub const PL_FLAG_SA: ::c_int = 0x01;
1116+
pub const PL_FLAG_BOUND: ::c_int = 0x02;
1117+
pub const PL_FLAG_SCE: ::c_int = 0x04;
1118+
pub const PL_FLAG_SCX: ::c_int = 0x08;
1119+
pub const PL_FLAG_EXEC: ::c_int = 0x10;
1120+
pub const PL_FLAG_SI: ::c_int = 0x20;
1121+
pub const PL_FLAG_FORKED: ::c_int = 0x40;
1122+
pub const PL_FLAG_CHILD: ::c_int = 0x80;
1123+
pub const PL_FLAG_BORN: ::c_int = 0x100;
1124+
pub const PL_FLAG_EXITED: ::c_int = 0x200;
1125+
pub const PL_FLAG_VFORKED: ::c_int = 0x400;
1126+
pub const PL_FLAG_VFORK_DONE: ::c_int = 0x800;
1127+
11001128
pub const PT_LWPINFO: ::c_int = 13;
11011129
pub const PT_GETNUMLWPS: ::c_int = 14;
11021130
pub const PT_GETLWPLIST: ::c_int = 15;

0 commit comments

Comments
 (0)