Skip to content

Commit 52607be

Browse files
committed
Auto merge of #2368 - GuillaumeGomez:mach-task-self, r=JohnTitor
Add mach_task_self function
2 parents f290210 + 451e488 commit 52607be

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
@@ -4501,6 +4501,12 @@ extern "C" {
45014501
max_protection: ::vm_prot_t,
45024502
inheritance: ::vm_inherit_t,
45034503
) -> ::kern_return_t;
4504+
4505+
pub static mut mach_task_self_: mach_port_t;
4506+
}
4507+
4508+
pub unsafe fn mach_task_self() -> mach_port_t {
4509+
mach_task_self_
45044510
}
45054511

45064512
cfg_if! {

0 commit comments

Comments
 (0)