]> git.saurik.com Git - apple/xnu.git/blob - osfmk/man/bootstrap_arguments.html
xnu-2422.1.72.tar.gz
[apple/xnu.git] / osfmk / man / bootstrap_arguments.html
1 <h2>bootstrap_arguments</h2>
2 <hr>
3 <p>
4 <strong>Function</strong> - Return a set of arguments to the bootstrap task.
5 <h3>SYNOPSIS</h3>
6 <pre>
7 <strong>kern_return_t bootstrap_arguments</strong>
8 <strong>(mach_port_t</strong> <var>bootstrap</var>,
9 <strong>task_t</strong> <var>task</var>,
10 <strong>pointer_t</strong> <var>pointer_t</var>,
11 <strong>mach_msg_type_number_t</strong> <var>mach_msg_type_number_t</var><strong>);</strong>
12 </pre>
13 <h3>PARAMETERS</h3>
14 <dl>
15 <p>
16 <dt> <var>bootstrap</var>
17 <dd>
18 [in bootstrap send right]
19 The bootstrap port for the task, obtained from
20 <strong>task_get_special_ports</strong>.
21 <p>
22 <dt> <var>task</var>
23 <dd>
24 [in task send right]
25 The task port for the task whose argument strings are requested.
26 <p>
27 <dt> <var>arguments</var>
28 <dd>
29 [pointer to dynamic out array of characters]
30 The argument strings for the task. This is an array of
31 <var>argumentCnt</var> bytes, containing NUL characters
32 separating the strings.
33 <p>
34 <dt> <var>argumentsCnt</var>
35 <dd>
36 [out pointer to scalar]
37 Number of bytes contained in <var>arguments</var>.
38 </dl>
39 <h3>DESCRIPTION</h3>
40 <p>
41 The kernel will respond to the bootstrap task (task 1) with the
42 arguments and environment specified to the boot loader. The bootstrap
43 task can act as a server on this interface for the tasks that it
44 creates in order to pass arguments to them. The <strong>libsa_mach.a</strong>
45 standalone Mach C runtime startup code uses <strong>bootstrap_arguments</strong> and
46 <strong>bootstrap_environment</strong> to initialize <var>argc</var>, <var>argv</var>,
47 and <var>envp</var> for <strong>main</strong>.
48 <h3>RETURN VALUES</h3>
49 <p>
50 Only generic errors apply.
51 <h3>RELATED INFORMATION</h3>
52 <p>
53 Functions:
54 <a href="bootstrap_ports.html"><strong>bootstrap_ports</strong></a>,
55 <a href="bootstrap_environment.html"><strong>bootstrap_environment</strong></a>.
56