Petr koupy wrote:
> 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.
Technically it would be possible for devman to return control when the initial
bus enumeration was completed. Practically the usefulness of such feature is
*very* limited, IMHO. Except for such cases as "in the installer I want the
user to be able to select from the available disks, I need to wait until all
disks have been probed so I can be sure all disks are listed."
What actual problem are you trying to solve?
First of all, clients don't know anything about devman or drivers, they just
know about services. If your client depends on a particular service, it can
connect to it in blocking mode (i.e. wait for it to become available) or
connect to it when it becomes available. If your client connects to all
services in a category, for example, it can simply connect to them as they
become available.
Cheers,
Jiri
_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/cgi-bin/listinfo/helenos-devel