task_set_emulation_vector.html   [plain text]

<strong>Function</strong> - Establish the target task's user-level system call handlers. 
<strong>kern_return_t   task_set_emulation_vector</strong>
                <strong>(task_t</strong>                                    <var>task</var>,
                 <strong>int</strong>                               <var>vector_start</var>,
                 <strong>emulation_vector_t</strong>            <var>emulation_vector</var>,
                 <strong>mach_msg_type_number_t</strong>  <var>emulation_vector_count</var><strong>);</strong>
<dt> <var>task</var> 
[in task send right]
The port for the task for which to establish the
system call handler.
<dt> <var>vector_start</var> 
[in scalar]
The syscall number corresponding to the first element of
<dt> <var>emulation_vector</var> 
[pointer to in array of <strong>vm_address_t</strong>]
An array of routine entrypoints 
for the system calls starting with syscall number <var>vector_start</var>.
<dt> <var>emulation_vector_count</var> 
[in scalar]
The number of elements in <var>emulation_vector</var>.
The <strong>task_set_emulation_vector</strong> 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.
This interface is machine word length specific because of the
virtual addresses 
in the <var>emulation_vector</var> parameter.
Only generic errors apply.
<a href="task_get_emulation_vector.html"><strong>task_get_emulation_vector</strong></a>.