]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/examples/libs/l4re/c++/clntsrv_ns/ns.cfg
Update
[l4.git] / l4 / pkg / examples / libs / l4re / c++ / clntsrv_ns / ns.cfg
1 -- vim:set ft=lua:
2
3 -- Include L4 functionality
4 local L4 = require("L4");
5
6 -- Some shortcut for less typing
7 local ld = L4.default_loader;
8
9 -- Namespace to exchange objects
10 -- Reserve the name the server will use later, so that
11 -- the client knows that it is waiting for an object
12 -- intended to be created later.
13 local ns = ld:create_namespace({ the_object = "placeholder" });
14
15 -- The server program, getting the namespace with extended
16 -- access rights (read + write)
17 ld:start({ caps = { namespace = ns:m("rw") },
18            log = { "server", "cyan" } },
19            "rom/ex_ns-server");
20
21 -- The client program, getting the 'calc_server' channel to be able to talk
22 -- to the server. The client will be started with a green log output.
23 -- Note, the client only gets read rights for the namespace, so it may
24 -- query, but cannot register own objects.
25 ld:start({ caps = { namespace = ns:m("r") },
26            log = { "client", "green" } },
27           "rom/ex_ns-client");