Previous: Task Special Ports, Up: Task Interface


7.2.6 Syscall Emulation

— Function: kern_return_t task_get_emulation_vector (task_t task, int *vector_start, emulation_vector_t *emulation_vector, mach_msg_type_number_t *emulation_vector_count)

The function task_get_emulation_vector gets the user-level handler entry points for all emulated system calls.

— Function: kern_return_t task_set_emulation_vector (task_t task, int vector_start, emulation_vector_t emulation_vector, mach_msg_type_number_t emulation_vector_count)

The function task_set_emulation_vector establishes user-level handlers for the specified system calls. Non-emulated system calls are specified with an entry of EML_ROUTINE_NULL. System call emulation handlers are inherited by the children of task.

— Function: kern_return_t task_set_emulation (task_t task, vm_address_t routine_entry_pt, int routine_number)

The function task_set_emulation establishes a user-level handler for the specified system call. System call emulation handlers are inherited by the children of task.