Increase IPC-Stream size

Adam Lackorzynski adam at os.inf.tu-dresden.de
Sun May 10 23:07:23 CEST 2015


On Mon May 04, 2015 at 19:23:01 +0200, ba_f wrote:
> the ned's script you mentioned is the lua .cfg, isnt it?

yes.

> Giving them the same namespace, doesn't this make them ONE task, ie. share
> ALL memory?

No. They (just) share the namespace, and there could be multiple
namespaces which one can share between tasks.

> If not, can u give me an example how to share just 4kB, for example?
> 
> I've also seen a flexpage example: examples/libs/l4re/streammap/.
> Is this a nice example for a 4kB Flexpage?
> 
> I need to transmit a 4kB buffer and 4kB as response.
> What is L4's most elegant way to do so?

Elegant depends probably :) One way without much bells and whistles is
creating a dataspace in the config script and attaching it on each side:
 local ds = L4.Env.mem_alloc:create(L4.Proto.Dataspace, 4096);

 L4.default_loader:start({ caps = { shmds = ds:m("rw"); }}, "rom/one");
 L4.default_loader:start({ caps = { shmds = ds:m("rw"); }}, "rom/two");

Then attach it via L4Re::Rm::attach(). I guess you also want some kind
of notification. You could use standard IPC for that, or, better, use
Irqs, i.e. two, one for each side. libshmc wraps this, esp. settings
this up incl. the notification via Irqs.




Adam
-- 
Adam                 adam at os.inf.tu-dresden.de
  Lackorzynski         http://os.inf.tu-dresden.de/~adam/




More information about the l4-hackers mailing list