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