svn commit: r241295 - head/sys/kern

Andriy Gapon avg at FreeBSD.org
Sat Oct 6 19:50:23 UTC 2012


Author: avg
Date: Sat Oct  6 19:50:23 2012
New Revision: 241295
URL: http://svn.freebsd.org/changeset/base/241295

Log:
  cngetc: use cpu_spinwait to ease the cncheckc loop a tiny bit
  
  Reviewed by:	julian
  MFC after:	10 days

Modified:
  head/sys/kern/kern_cons.c

Modified: head/sys/kern/kern_cons.c
==============================================================================
--- head/sys/kern/kern_cons.c	Sat Oct  6 19:48:15 2012	(r241294)
+++ head/sys/kern/kern_cons.c	Sat Oct  6 19:50:23 2012	(r241295)
@@ -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);


More information about the svn-src-head mailing list