grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC] Multi-terminal support (Re: [PATCH] terminal split)


From: Vesa Jääskeläinen
Subject: Re: [RFC] Multi-terminal support (Re: [PATCH] terminal split)
Date: Sat, 29 Nov 2008 23:20:54 +0200
User-agent: Thunderbird 2.0.0.18 (Windows/20081105)

Robert Millan wrote:
> 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).

Well... I think better road would be co-operative multitasking. While
waiting for hardware to respond you could give time to other tasks to
handle their stuff. This would also make easier to write such tasks as
you do not have to think about complex event system. System you propose
can get quite complex to understand and maintain.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]