[Barrelfish-users] How the kernel informs an application to handle some events.

Stefan Kästle stefan.kaestle at inf.ethz.ch
Mon Mar 4 11:15:13 CET 2013


User-space applications can wait on so called endpoints. The kernel can 
then send a message to this endpoint (using lmp_deliver_notifications), 
which will trigger a handler-function to be called. From the perspective 
of the user-space application, you would then call event_dispatch(), 
which blocks until a notification arrives.

Have a look at how we implement support for performance counters. The 
user-level code is in usr/tests/perfmontest. The kernel part of the 
implementation is in the code for interrupt handling (to send to 
endpoints when the counters overflow) and syscalls (we use capabilities 
to register the endpoints).

If you need more help I will have to give me some more concrete 
information on what exactly you want to do.


On 03/04/2013 11:01 AM, Zhiquan Lai wrote:
> Dear Stefan,
>
> Actually, I want to know the general method that we can use to inform 
> user applications in the Barrelfish kernel.
>
> But you can assume that I receive a UMP-IPI notification. Then how can 
> I inform the a user application to handle this event ?
>
> Thanks,
> Zhiquan
>
>
> On Mon, Mar 4, 2013 at 5:47 PM, Stefan Kästle 
> <stefan.kaestle at inf.ethz.ch <mailto:stefan.kaestle at inf.ethz.ch>> wrote:
>
>     Are you talking about UMP-IPI notifications?
>
>     On 03/02/2013 10:29 AM, Zhiquan Lai wrote:
>>     Hi all,
>>
>>     When the kernel receive a certain notification, I want to export
>>     some parameters to an user application and inform it to handle
>>     this notification.
>>     How can I implement that in Barrelfish?
>>
>>     Should the application register a handler to the kernel? But I
>>     think the kernel can not call that handler directly.
>>
>>     Thanks,
>>     Zhiquan
>>
>>
>>     _______________________________________________
>>     Barrelfish-users mailing list
>>     Barrelfish-users at lists.inf.ethz.ch  <mailto:Barrelfish-users at lists.inf.ethz.ch>
>>     https://lists.inf.ethz.ch/mailman/listinfo/barrelfish-users
>
>     -- 
>     Stefan
>
>
>     _______________________________________________
>     Barrelfish-users mailing list
>     Barrelfish-users at lists.inf.ethz.ch
>     <mailto:Barrelfish-users at lists.inf.ethz.ch>
>     https://lists.inf.ethz.ch/mailman/listinfo/barrelfish-users
>
>

-- 
Stefan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.inf.ethz.ch/pipermail/barrelfish-users/attachments/20130304/7e4e80db/attachment.html 


More information about the Barrelfish-users mailing list