On Tue, Nov 25, 2008 at 10:23:52PM +0100, Yoshinori K. Okuji wrote: > > > > I've been thinking... what if we make this generic? I.e. with an event > > loop, then terminals can register their poll functions to it, and write > > their stuff to a shared resource the rest of GRUB can read from. > > For inputs, this is trivial for me. But, for outputs, not simple. For > example, > although we don't support yet in GRUB 2, if we have a dumb terminal, the menu > interface must be very different from others.
Aside from the problem with output ones, what to you think of the event loop idea? It can be useful exploit the parellelism in hardware initialisations. Currently GRUB can do silly things like: - wait for keyboard controller in grub_keyboard_controller_read() and in grub_keyboard_controller_write() - move on - wait for ATA disk in grub_atapi_read() - move on - wait for _user_ to stare at the menu and pick an option - move on which could be avoided this way (instead of waiting, each function would register a hook that will be repeatedly run untill it returns non-zero). -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all." _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel