Create multiple processes.
Norman Feske
norman.feske at ...1...
Thu Jun 16 10:42:56 CEST 2011
Hi Chen,
I do not quite understand what you mean with "print". Are you referring
to the pointers returned by said functions? If yes, what information do
you expect to gain from these local address values? The 'env()' function
returns a local object that represents the environment of the process as
created by the parent. The object is normally located within the BSS
segment of the program. See the implementation of the 'env()' function
at ' base/src/base/env/env.cc'. The class implementing the 'Env'
interface can be found here: 'base/include/base/platform_env.h'.
When 'env()' is called for the first time, the single 'Platform_env'
object is constructed ('_env' is a local static variable of 'env()').
Upon construction, 'Platform_env' requests the process's CPU, RAM, RM,
and PD session from the parent interface by specifying the corresponding
service names prefixed with "Env::" as argument to the
'parent()->session()' call. At the parent side, these session requests
are especially handled. See 'base/include/base/child.h'. This way, the
child process retrieves the environment information from its parent. In
the 'Child' class, you can see that for these "Env::" sessions, the
parent returns capabilities taken from the local 'Child' object context.
Best regards
Norman
On 06/16/2011 02:57 AM, Chen Tian - SISA wrote:
> Thanks for the reply.
>
> I printed "env()", "env->ram_session()" and "env()->rm_session()" of
> core, init, and another three apps: test-timer, myapp1 and myapp2.
> I don't understand why I get the same set of values for myapp1 and
> myapp2? The sets of value for others are different.
>
> Best,
> Chen
--
Dr.-Ing. Norman Feske
Genode Labs
http://www.genode-labs.com · http://genode.org
Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
More information about the users
mailing list