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