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