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