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