Hi Jiri,

> > Personally,
> > I think it would be better to request devman to initialize certain drivers
> > synchronously and then simply fetch them from location service categories -
> I don't understand what you mean.
> 
> > however this is currently not possible as devman is launching all drivers
> > asynchronously. Anyway, back to the encountered problems with the callback
> > solution.
> I still don't follow.

When starting server-based drivers in the init routine, you can choose whether
to start them synchronously (srv_start()) or asynchronously (spawn()). However
there is no such option for ddf-based drivers as they are always started
asynchronously by devman. It could be solved by introducing a driver attribute
specifying the preferable way of its execution - devman would then read this
attribute and either call just task_spawn or task_spawn+task_wait. While the
described feature could be useful in the current init routine (i.e. you could
assume some drivers are running after calling srv_start("/srv/devman")), 
I understand that asynchronous case using category change callback is preferable
in the longterm. However, until more than one callback is supported, you are
basically stuck with polling the categories.

> > First of all, location service currently supports just a single callback
> > ...
> Currently only one task can register only one callback, not more. But that's
> just because it wasn't needed yet, so it wasn't implemented. Now it's needed,
> so it should be implemented. It's a simple and straightforward thing to do.

I have not yet assessed how difficult it would be to improve the location 
service, so glad to hear it should be trivial.
 
> > Secondly, registering a callback alone is not enough to safely discover all
> > ...
> No. Look at the code in input server and you will see it works perfectly.
> When input server starts it:
> 1. registers a change notification callback
> 2. scans the desired categories (kbd and mouse)
> 3. whenever the categories change, the callback is invoked and the categories
> are re-scanned
> 
> So, any services registered before the start of the server are discovered
> during step 1.

Sorry for the noise. You are right, I missed the category check in the input 
server initialization.

> > Regarding the recent changes to input server, I also encountered very
> > peculiar race condition ...
> That's really strange. Let me know if you find out more.

Of course, but it might take a while. I just wanted to give you and rest of
the team heads up that there is potentially such issue with the reworked input.

Petr


_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/cgi-bin/listinfo/helenos-devel

Reply via email to