All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yoshinori K. Okuji" <okuji@enbug.org>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] Split of normal mode (version 2)
Date: Sun, 5 Apr 2009 23:23:54 +0900	[thread overview]
Message-ID: <200904052323.55123.okuji@enbug.org> (raw)
In-Reply-To: <20090403160240.189e35cf@gibibit.com>

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	other threads:[~2009-04-05 14:24 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-30 17:41 [PATCH] Split of normal mode (version 2) Bean
2009-04-03 18:40 ` Yoshinori K. Okuji
2009-04-03 19:49   ` Bean
2009-04-03 20:12     ` Yoshinori K. Okuji
2009-04-03 22:19       ` phcoder
2009-04-03 23:02         ` Colin D Bennett
2009-04-05 14:23           ` Yoshinori K. Okuji [this message]
2009-04-04  5:06       ` Bean
2009-04-05 14:33         ` Yoshinori K. Okuji
2009-04-05 15:02           ` Bean
2009-04-05 15:43             ` Yoshinori K. Okuji
2009-04-06 16:39               ` Bean
2009-04-07  0:41                 ` Yoshinori K. Okuji
2009-04-09 23:49                 ` Yoshinori K. Okuji
2009-04-10  5:17                   ` Bean
2009-04-10 20:17                     ` Bean
2009-04-11  9:50                       ` Yoshinori K. Okuji
2009-04-11 14:03                         ` Bean

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200904052323.55123.okuji@enbug.org \
    --to=okuji@enbug.org \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.