1<h2>task_set_emulation_vector</h2>
2<hr>
3<p>
4<strong>Function</strong> - Establish the target task's user-level system call handlers. 
5<h3>SYNOPSIS</h3>
6<pre>
7<strong>kern_return_t   task_set_emulation_vector</strong>
8                <strong>(task_t</strong>                                    <var>task</var>,
9                 <strong>int</strong>                               <var>vector_start</var>,
10                 <strong>emulation_vector_t</strong>            <var>emulation_vector</var>,
11                 <strong>mach_msg_type_number_t</strong>  <var>emulation_vector_count</var><strong>);</strong>
12</pre>
13<h3>PARAMETERS</h3>
14<dl>
15<p>
16<dt> <var>task</var> 
17<dd>
18[in task send right]
19The port for the task for which to establish the
20system call handler.
21<p>
22<dt> <var>vector_start</var> 
23<dd>
24[in scalar]
25The syscall number corresponding to the first element of
26<var>emulation_vector</var>.
27<p>
28<dt> <var>emulation_vector</var> 
29<dd>
30[pointer to in array of <strong>vm_address_t</strong>]
31An array of routine entrypoints 
32for the system calls starting with syscall number <var>vector_start</var>.
33<p>
34<dt> <var>emulation_vector_count</var> 
35<dd>
36[in scalar]
37The number of elements in <var>emulation_vector</var>.
38</dl>
39<h3>DESCRIPTION</h3>
40<p>
41The <strong>task_set_emulation_vector</strong> function establishes
42a handler within the task 
43for a set of system calls.  When a thread executes a system call
44with one of these 
45numbers, the system call will be redirected to the corresponding
46routine within 
47the task's address space.
48<p>
49These emulation handler addresses are inherited by child processes.
50<h3>NOTES</h3>
51<p>
52This interface is machine word length specific because of the
53virtual addresses 
54in the <var>emulation_vector</var> parameter.
55<h3>RETURN VALUES</h3>
56<p>
57Only generic errors apply.
58<h3>RELATED INFORMATION</h3>
59<p>
60Functions:
61<a href="task_get_emulation_vector.html"><strong>task_get_emulation_vector</strong></a>.
62