Back to Darwin Xnu

Task Set Emulation Vector

osfmk/man/task_set_emulation_vector.html

latest1.4 KB
Original Source

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.

Functions: task_get_emulation_vector.