]> git.saurik.com Git - apple/xnu.git/blame - osfmk/man/task_set_emulation.html
xnu-2422.1.72.tar.gz
[apple/xnu.git] / osfmk / man / task_set_emulation.html
CommitLineData
13fec989
A
1<h2>task_set_emulation</h2>
2<hr>
3<p>
4<strong>Function</strong> - Establish a user-level handler for a system call.
5<h3>SYNOPSIS</h3>
6<pre>
7<strong>kern_return_t task_set_emulation</strong>
8 <strong>(task_t</strong> <var>task</var>,
9 <strong>vm_address_t</strong> <var>routine_entry_pt</var>,
10 <strong>int</strong> <var>syscall_number</var><strong>);</strong>
11</pre>
12<h3>PARAMETERS</h3>
13<dl>
14<p>
15<dt> <var>task</var>
16<dd>
17[in task port] The port for the task for which to establish the system call handler.
18<p>
19<dt> <var>routine_entry_pt</var>
20<dd>
21[in scalar] The address within the task of the handler for this particular system call.
22<p>
23<dt> <var>syscall_number</var>
24<dd>
25[in scalar] The number of the system call to be handled by this handler.
26</dl>
27<h3>DESCRIPTION</h3>
28<p>
29The <strong>task_set_emulation</strong> function establishes a handler within the task
30for a particular system call. When a thread executes a system call
31with this particular number, the system call will be redirected to the
32specified routine within the task's address space. This is expected to
33be an address within the transparent emulation library. These
34emulation handler addresses are inherited by child processes.
35<h3>NOTES</h3>
36<p>
37This interface is machine word length specific because of the virtual
38address parameter.
39<h3>RETURN VALUES</h3>
40<p>
41Only generic errors apply.
42<h3>RELATED INFORMATION</h3>
43<p>
44Functions:
45<a href="task_set_emulation_vector.html"><strong>task_set_emulation_vector</strong></a>,
46<a href="task_get_emulation_vector.html"><strong>task_get_emulation_vector</strong></a>.