]> git.saurik.com Git - apple/xnu.git/blob - osfmk/man/norma_task_clone.html
xnu-1504.3.12.tar.gz
[apple/xnu.git] / osfmk / man / norma_task_clone.html
1 <h2>norma_task_clone</h2>
2 <hr>
3 <p>
4 <strong>Function</strong> - Create a remote task that shares access to parent task's memory regardless of inheritance attributes.
5 <h3>SYNOPSIS</h3>
6 <pre>
7 <strong>kern_return_t norma_task_clone</strong>
8 <strong>(task_t</strong> <var>parent_task</var>,
9 <strong>boolean_t</strong> <var>inherit_memory</var>,
10 <strong>int</strong> <var>child_node</var>,
11 <strong>task_t</strong> <var>child_task</var><strong>);</strong>
12 </pre>
13 <h3>PARAMETERS</h3>
14 <dl>
15 <p>
16 <dt> <var>parent_task</var>
17 <dd>
18 [in task send right]
19 The port for the task from which to draw the child
20 task's port rights, resource limits, and address space.
21 <p>
22 <dt> <var>inherit_memory</var>
23 <dd>
24 [in scalar]
25 Address space inheritance indicator. If true, the child task
26 inherits the address space of the parent task. If false, the kernel assigns
27 the child task an empty address space.
28 <p>
29 <dt> <var>child_node</var>
30 <dd>
31 [in scalar]
32 The node index of the node on which to create the child.
33 <p>
34 <dt> <var>child_task</var>
35 <dd>
36 [out task send right]
37 The kernel-assigned port name for the new task.
38 </dl>
39 <h3>DESCRIPTION</h3>
40 <p>
41 The <strong>norma_task_clone</strong> function "clones" a new task from
42 <var>parent_task</var> on the specified <var>node</var> and returns the name
43 of the new task in <var>child_task</var>. The child
44 task acquires shared parts of the parent's
45 address space (see <strong>vm_inherit</strong>)
46 regardless of the inheritance set for the parent's memory regions, although the
47 inheritance for the child's regions will be set to that of the
48 parent's regions. The child
49 task initially contains no threads.
50 <p>
51 By way of comparison, tasks created by the standard <strong>task_create</strong>
52 primitive are created on the same node as the parent.
53 <p>
54 Other than being created on a different node, the new task has the same
55 properties as if created by <strong>task_create</strong>.
56 <h3>NOTES</h3>
57 <p>
58 This call differs from <strong>norma_task_create</strong> in that the
59 inheritance set for the
60 parent's memory regions is ignored; the child always shares memory with the
61 parent.
62 <p>
63 This call is intended to support process migration, where the inheritance
64 semantics of <strong>norma_task_create</strong> would break migrated
65 programs that depended upon
66 sharing relationships remaining after migration.
67 <p>
68 This call is not a true task migration call, in that it does
69 not migrate the port
70 space, threads, and other non-address-space attributes of the task.
71 <h3>RETURN VALUES</h3>
72 <p>
73 Only generic errors apply.
74 <h3>RELATED INFORMATION</h3>
75 <p>
76 Functions:
77 <a href="task_create.html"><strong>task_create</strong></a>,
78 <a href="norma_task_create.html"><strong>norma_task_create</strong></a>.