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