cngetc: use cpu_spinwait to ease the cncheckc loop a tiny bit

Reviewed by:	julian
MFC after:	10 days
This commit is contained in:
Andriy Gapon 2012-10-06 19:50:23 +00:00
parent 9d200697d7
commit 298fbd1605
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=241295

View file

@ -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);