]>
Commit | Line | Data |
---|---|---|
1 | <h2>norma_task_clone</h2>\r<hr>\r<p>\r<strong>Function</strong> - Create a remote task that shares access to parent task's memory regardless of inheritance attributes.\r<h3>SYNOPSIS</h3>\r<pre>\r<strong>kern_return_t norma_task_clone</strong>\r <strong>(task_t</strong> <var>parent_task</var>,\r <strong>boolean_t</strong> <var>inherit_memory</var>,\r <strong>int</strong> <var>child_node</var>,\r <strong>task_t</strong> <var>child_task</var><strong>);</strong>\r</pre>\r<h3>PARAMETERS</h3>\r<dl>\r<p>\r<dt> <var>parent_task</var> \r<dd>\r[in task send right]\rThe port for the task from which to draw the child \rtask's port rights, resource limits, and address space.\r<p>\r<dt> <var>inherit_memory</var> \r<dd>\r[in scalar]\rAddress space inheritance indicator. If true, the child task\rinherits the address space of the parent task. If false, the kernel assigns \rthe child task an empty address space.\r<p>\r<dt> <var>child_node</var> \r<dd>\r[in scalar]\rThe node index of the node on which to create the child.\r<p>\r<dt> <var>child_task</var> \r<dd>\r[out task send right]\rThe kernel-assigned port name for the new task.\r</dl>\r<h3>DESCRIPTION</h3>\r<p>\rThe <strong>norma_task_clone</strong> function "clones" a new task from\r<var>parent_task</var> on the specified <var>node</var> and returns the name \rof the new task in <var>child_task</var>. The child \rtask acquires shared parts of the parent's \raddress space (see <strong>vm_inherit</strong>)\rregardless of the inheritance set for the parent's memory regions, although the\rinheritance for the child's regions will be set to that of the\rparent's regions. The child \rtask initially contains no threads.\r<p>\rBy way of comparison, tasks created by the standard <strong>task_create</strong>\rprimitive are created on the same node as the parent.\r<p>\rOther than being created on a different node, the new task has the same\rproperties as if created by <strong>task_create</strong>.\r<h3>NOTES</h3>\r<p>\rThis call differs from <strong>norma_task_create</strong> in that the\rinheritance set for the\rparent's memory regions is ignored; the child always shares memory with the\rparent.\r<p>\rThis call is intended to support process migration, where the inheritance\rsemantics of <strong>norma_task_create</strong> would break migrated\rprograms that depended upon \rsharing relationships remaining after migration.\r<p>\rThis call is not a true task migration call, in that it does\rnot migrate the port \rspace, threads, and other non-address-space attributes of the task.\r<h3>RETURN VALUES</h3>\r<p>\rOnly generic errors apply.\r<h3>RELATED INFORMATION</h3>\r<p>\rFunctions:\r<a href="task_create.html"><strong>task_create</strong></a>,\r<a href="norma_task_create.html"><strong>norma_task_create</strong></a>.\r |