diff options
author | avg <avg@FreeBSD.org> | 2012-10-06 19:50:23 +0000 |
---|---|---|
committer | avg <avg@FreeBSD.org> | 2012-10-06 19:50:23 +0000 |
commit | 7e3795ec58e243325a130b2d352a9d7ae132e3e9 (patch) | |
tree | 0f4d346b3d847745fda18211f497935a3f6196bb | |
parent | 694832afbf65421992e4f220a23e8de20d71598f (diff) | |
download | FreeBSD-src-7e3795ec58e243325a130b2d352a9d7ae132e3e9.zip FreeBSD-src-7e3795ec58e243325a130b2d352a9d7ae132e3e9.tar.gz |
cngetc: use cpu_spinwait to ease the cncheckc loop a tiny bit
Reviewed by: julian
MFC after: 10 days
-rw-r--r-- | sys/kern/kern_cons.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |