Back to Darwin Xnu

Task Set Emulation

osfmk/man/task_set_emulation.html

latest1.3 KB
Original Source

task_set_emulation


Function - Establish a user-level handler for a system call.

SYNOPSIS

**kern\_return\_t task\_set\_emulation**** (task\_t **task,** vm\_address\_t **routine\_entry\_pt,** int **syscall\_number** );**

PARAMETERS

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

routine_entry_pt[in scalar] The address within the task of the handler for this particular system call.

syscall_number[in scalar] The number of the system call to be handled by this handler.

DESCRIPTION

The task_set_emulation function establishes a handler within the task for a particular system call. When a thread executes a system call with this particular number, the system call will be redirected to the specified routine within the task's address space. This is expected to be an address within the transparent emulation library. These emulation handler addresses are inherited by child processes.

NOTES

This interface is machine word length specific because of the virtual address parameter.

RETURN VALUES

Only generic errors apply.

Functions: task_set_emulation_vector, task_get_emulation_vector.