]> git.saurik.com Git - apple/xnu.git/blame - osfmk/man/task_set_emulation.html
xnu-344.tar.gz
[apple/xnu.git] / osfmk / man / task_set_emulation.html
CommitLineData
9bccf70c 1<h2>task_set_emulation</h2>\r<hr>\r<p>\r<strong>Function</strong> - Establish a user-level handler for a system call.\r<h3>SYNOPSIS</h3>\r<pre>\r<strong>kern_return_t task_set_emulation</strong>\r <strong>(task_t</strong> <var>task</var>,\r <strong>vm_address_t</strong> <var>routine_entry_pt</var>,\r <strong>int</strong> <var>syscall_number</var><strong>);</strong>\r</pre>\r<h3>PARAMETERS</h3>\r<dl>\r<p>\r<dt> <var>task</var>\r<dd>\r[in task port] The port for the task for which to establish the system call handler.\r<p>\r<dt> <var>routine_entry_pt</var>\r<dd>\r[in scalar] The address within the task of the handler for this particular system call.\r<p>\r<dt> <var>syscall_number</var>\r<dd>\r[in scalar] The number of the system call to be handled by this handler.\r</dl>\r<h3>DESCRIPTION</h3>\r<p>\rThe <strong>task_set_emulation</strong> function establishes a handler within the task\rfor a particular system call. When a thread executes a system call\rwith this particular number, the system call will be redirected to the\rspecified routine within the task's address space. This is expected to\rbe an address within the transparent emulation library. These\remulation handler addresses are inherited by child processes.\r<h3>NOTES</h3>\r<p>\rThis interface is machine word length specific because of the virtual\raddress parameter.\r<h3>RETURN VALUES</h3>\r<p>\rOnly generic errors apply.\r<h3>RELATED INFORMATION</h3>\r<p>\rFunctions:\r<a href="task_set_emulation_vector.html"><strong>task_set_emulation_vector</strong></a>,\r<a href="task_get_emulation_vector.html"><strong>task_get_emulation_vector</strong></a>.\r