[Barrelfish-users] Have barrelfish implement kernel time-wait mechanism(for ARM)?
stefan.kaestle at inf.ethz.ch
Thu Jul 4 13:38:37 CEST 2013
we have a mechanism called "deferred events" to do exactly that. Have a
look at include/barrelfish/deferred.h for related functions and
lib/posixcompat/select.c for an example on how to use it.
Basically, you register an endpoint (i.e. a function) that will be
executed after the time specified in the deferred_event_register call.
You will have to dispatch events after that for the upcall to work. In
2) deferred_event_register(..., MKCLOSURE(your_function, args))
3) event_dispatch() to wait for the event to be fired.
AFAIK event_dispatch will poll on the given waitset for a while and then
yield the thread, so that other threads in the same domain or other
domains can be scheduled.
I never tested it on ARM, but I don't see a reason why it wouldn't work.
On 07/04/2013 01:22 PM, Wang Nan wrote:
> Other than busy loop, is there any way to make current dispatcher wait for a while (5ms for example) (schedule other dispatcher, or put core in WFI state)?
> In get_next_event(), I find that currently you use ARM's PMU and busy loop for that. Can I use hardware timer?
> Thank you!
> Barrelfish-users mailing list
> Barrelfish-users at lists.inf.ethz.ch
More information about the Barrelfish-users