Date: Tue, 18 Sep 2012 16:25:09 +0300 From: Andriy Gapon <avg@FreeBSD.org> To: freebsd-hackers <freebsd-hackers@FreeBSD.org> Subject: cpu_spinwait in cngetc Message-ID: <50587635.8070007@FreeBSD.org>
next in thread | raw e-mail | index | archive | help
(Why[*]) Would anyone object to a change like this? diff --git a/sys/kern/kern_cons.c b/sys/kern/kern_cons.c index 5346bc3..d17846a 100644 --- a/sys/kern/kern_cons.c +++ b/sys/kern/kern_cons.c @@ -384,7 +384,7 @@ cngetc(void) if (cn_mute) return (-1); while ((c = cncheckc()) == -1) - ; + cpu_spinwait(); if (c == '\r') c = '\n'; /* console input is always ICRNL */ return (c); [*] :-) -- Andriy Gapon
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50587635.8070007>