Skip to content

Commit 451e488

Browse files
Add mach_task_self function
1 parent 2cffe84 commit 451e488

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/unix/bsd/apple/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4480,6 +4480,12 @@ extern "C" {
44804480
max_protection: ::vm_prot_t,
44814481
inheritance: ::vm_inherit_t,
44824482
) -> ::kern_return_t;
4483+
4484+
pub static mut mach_task_self_: mach_port_t;
4485+
}
4486+
4487+
pub unsafe fn mach_task_self() -> mach_port_t {
4488+
mach_task_self_
44834489
}
44844490

44854491
cfg_if! {

0 commit comments

Comments
 (0)