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