Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Mar 2016 14:42:22 +0100
From:      Edward Tomasz =?utf-8?Q?Napiera=C5=82a?= <trasz@FreeBSD.org>
To:        =?iso-8859-1?Q?Jean-S=E9bastien_P=E9dron?= <jean-sebastien.pedron@dumbbell.fr>
Cc:        Ian Lepore <ian@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r297190 - head/sys/kern
Message-ID:  <20160324134222.GA1442@brick.home>
In-Reply-To: <56F3B441.6030602@dumbbell.fr>
References:  <201603221346.u2MDk1XH029623@repo.freebsd.org> <1458662141.1091.16.camel@freebsd.org> <56F29654.8030806@dumbbell.fr> <20160323174537.GA1826@brick.home> <56F3B441.6030602@dumbbell.fr>

next in thread | previous in thread | raw e-mail | index | archive | help
On 0324T1032, Jean-Sébastien Pédron wrote:
> On 23/03/2016 18:45, Edward Tomasz Napierala wrote:
> >> So maybe callouts are disabled in this situation. If there is a way to
> >> detect that, then vt(4) can go back to a "synchronous mode" where it
> >> refreshes the screen after each typed character, like it does when ddb
> >> is active.
> > 
> > Looks like that's the case: for some reason the callouts don't work.
> > This trivial hack is a (mostly) working workaround:
> > 
> > Index: svn/head/sys/kern/kern_cons.c
> > ===================================================================
> > --- svn/head/sys/kern/kern_cons.c	(revision 297210)
> > +++ svn/head/sys/kern/kern_cons.c	(working copy)
> > @@ -430,6 +430,7 @@ cngets(char *cp, size_t size, int visible)
> >  	lp = cp;
> >  	end = cp + size - 1;
> >  	for (;;) {
> > +		pause("meh", 1);
> 
> Could you please explain how this works to me? Does calling pause() here
> give a chance to interrupt handlers or other threads of running?

It looks like it allows the callout to run.  I've did an experiment
and added a simple callout that printed something each second; during
the root mount prompt it doesn't get run unless you type '.', which
calls pause(9).

And, for the record, https://reviews.freebsd.org/D5724 doesn't fix
the problem.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160324134222.GA1442>