svn commit: r241637 - stable/9/sys/kern

Andriy Gapon avg at FreeBSD.org
Wed Oct 17 11:30:14 UTC 2012


Author: avg
Date: Wed Oct 17 11:30:14 2012
New Revision: 241637
URL: http://svn.freebsd.org/changeset/base/241637

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

Modified:
  stable/9/sys/kern/kern_cons.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/kern/kern_cons.c
==============================================================================
--- stable/9/sys/kern/kern_cons.c	Wed Oct 17 11:30:00 2012	(r241636)
+++ stable/9/sys/kern/kern_cons.c	Wed Oct 17 11:30:14 2012	(r241637)
@@ -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-all mailing list