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