Nova+Nul one Execution Context suspend a second Execution Context
foxmehdi at gmail.com
Wed Dec 12 18:13:23 CET 2012
I wrote a simple example to test the NOVA+NUL.
In my example, I created two Execution Contexts.
When the the first Execution Context starts, it obtains a portal capability
the second Execution Context, and run a while(true) loop as follow :
The second Execution Context run also a while(true) loop as follow:
Logging::printf("WorkerThread is working... count= %u\n", count);
The first Execution Context call the second Execution Context. When the
second Execution Context
receive the call in its portal function, it calls the msleep( ) function on
a TimerHelper instance
that it has already created:
unsigned portal_func(Utcb &utcb, Utcb::Frame &input, bool &free_cap,
Logging::printf("Thread will sleep... count=%u\n", count);
The problem is that, it is the first Execution Context who is blocked and
second Execution Context.
Could anyone please give me an example of how can I achieve the inverse
case, where the first EC continue running
and suspends the second EC.
this is my code to obtain the portal:
cap_sel pseudonym = alloc_cap();
res = ParentProtocol::get_pseudonym(*utcb, "s0/ec2", 0, pseudonym);
cap_sel pt = alloc_cap();
res = ParentProtocol::get_portal(*utcb, pseudonym, pt, true,
Thank you in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the l4-hackers