this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

task_for_pid() and pid_for_task() implementation (#304)

+12 -4
+12 -4
src/kernel/emulation/linux/mach/mach_traps.c
··· 529 529 int pid, 530 530 mach_port_name_t *t) 531 531 { 532 - UNIMPLEMENTED_TRAP(); 533 - return KERN_FAILURE; 532 + struct task_for_pid args = { 533 + .pid = pid, 534 + .task_port = t, 535 + }; 536 + 537 + return ioctl(driver_fd, NR_task_for_pid_trap, &args); 534 538 } 535 539 536 540 kern_return_t task_name_for_pid_impl( ··· 546 550 mach_port_name_t t, 547 551 int *x) 548 552 { 549 - UNIMPLEMENTED_TRAP(); 550 - return KERN_FAILURE; 553 + struct pid_for_task args = { 554 + .task_port = t, 555 + .pid = x, 556 + }; 557 + 558 + return ioctl(driver_fd, NR_pid_for_task_trap, &args); 551 559 } 552 560 553 561 kern_return_t bsdthread_terminate_trap_impl(