grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Split of normal mode (version 2)


From: Yoshinori K. Okuji
Subject: Re: [PATCH] Split of normal mode (version 2)
Date: Sun, 5 Apr 2009 23:23:54 +0900
User-agent: KMail/1.9.10

On Saturday 04 April 2009 08:02:40 Colin D Bennett wrote:
> What if you switch back and forth between normal and rescue mode
> many times in a row?  The stack will grow with each call and eventually
> the stack will overflow and Bad Things will happen.

Yes.

> Now you could also return function pointers instead of using
> switch/case with enum constants, but it's the same concept.  Then
> setjmp is another similar way to do it without implementing a central
> dispatcher like grub_main above.

Exactly. For those who know the concept of continuation, setjmp/longjmp is 
very handy. This makes some kind of programs to be written easily and simply.

Regards,
Okuji




reply via email to

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