Skip to content

Commit 36db193

Browse files
committed
apple libproc api completion.
1 parent 9c4944a commit 36db193

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

libc-test/semver/apple.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1727,9 +1727,16 @@ posix_spawnp
17271727
preadv
17281728
proc_bsdinfo
17291729
proc_name
1730+
proc_listallpids
1731+
proc_listchildpids
1732+
proc_listpgrppids
1733+
proc_listpids
1734+
proc_libversion
17301735
proc_pidinfo
17311736
proc_pidfdinfo
1737+
proc_pidfileportinfo
17321738
proc_pidpath
1739+
proc_regionfilename
17331740
proc_taskallinfo
17341741
proc_taskinfo
17351742
proc_threadinfo

src/unix/bsd/apple/mod.rs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4049,6 +4049,20 @@ extern "C" {
40494049
// Added in macOS 10.13
40504050
// ISO/IEC 9899:2011 ("ISO C11") K.3.7.4.1
40514051
pub fn memset_s(s: *mut ::c_void, smax: ::size_t, c: ::c_int, n: ::size_t) -> ::c_int;
4052+
pub fn proc_listpids(
4053+
t: u32,
4054+
typeinfo: u32,
4055+
buffer: *mut ::c_void,
4056+
buffersize: ::c_int,
4057+
) -> ::c_int;
4058+
pub fn proc_listallpids(buffer: *mut ::c_void, buffersize: ::c_int) -> ::c_int;
4059+
pub fn proc_listpgrppids(
4060+
pgrpid: ::pid_t,
4061+
buffer: *mut ::c_void,
4062+
buffersize: ::c_int,
4063+
) -> ::c_int;
4064+
pub fn proc_listchildpids(ppid: ::pid_t, buffer: *mut ::c_void, buffersize: ::c_int)
4065+
-> ::c_int;
40524066
pub fn proc_pidinfo(
40534067
pid: ::c_int,
40544068
flavor: ::c_int,
@@ -4063,8 +4077,22 @@ extern "C" {
40634077
buffer: *mut ::c_void,
40644078
buffersize: ::c_int,
40654079
) -> ::c_int;
4080+
pub fn proc_pidfileportinfo(
4081+
pid: ::c_int,
4082+
fileport: u32,
4083+
flavor: ::c_int,
4084+
buffer: *mut ::c_void,
4085+
buffersize: ::c_int,
4086+
) -> ::c_int;
40664087
pub fn proc_pidpath(pid: ::c_int, buffer: *mut ::c_void, buffersize: u32) -> ::c_int;
40674088
pub fn proc_name(pid: ::c_int, buffer: *mut ::c_void, buffersize: u32) -> ::c_int;
4089+
pub fn proc_regionfilename(
4090+
pid: ::c_int,
4091+
address: u64,
4092+
buffer: *mut ::c_void,
4093+
buffersize: u32,
4094+
) -> ::c_int;
4095+
pub fn proc_libversion(major: *mut ::c_int, mintor: *mut ::c_int) -> ::c_int;
40684096
}
40694097

40704098
#[link(name = "iconv")]

0 commit comments

Comments
 (0)