## task_set_emulation_vector

Function - Establish the target task's user-level system call handlers.

### SYNOPSIS

    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);

### PARAMETERS

task
  [in task send right] The port for the task for which to establish the system call handler.

vector_start
  [in scalar] The syscall number corresponding to the first element of emulation_vector.

emulation_vector
  [pointer to in array of vm_address_t] An array of routine entrypoints for the system calls starting with syscall number vector_start.

emulation_vector_count
  [in scalar] The number of elements in emulation_vector.

### DESCRIPTION

The task_set_emulation_vector function establishes a handler within the task for a set of system calls. When a thread executes a system call with one of these numbers, the system call will be redirected to the corresponding routine within the task's address space.

These emulation handler addresses are inherited by child processes.

### NOTES

This interface is machine word length specific because of the virtual addresses in the emulation_vector parameter.

### RETURN VALUES

Only generic errors apply.

### RELATED INFORMATION

Functions: task_get_emulation_vector.