Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Oct 2012 11:30:26 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r241638 - stable/8/sys/kern
Message-ID:  <201210171130.q9HBUQg7060435@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Wed Oct 17 11:30:25 2012
New Revision: 241638
URL: http://svn.freebsd.org/changeset/base/241638

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

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

Modified: stable/8/sys/kern/kern_cons.c
==============================================================================
--- stable/8/sys/kern/kern_cons.c	Wed Oct 17 11:30:14 2012	(r241637)
+++ stable/8/sys/kern/kern_cons.c	Wed Oct 17 11:30:25 2012	(r241638)
@@ -353,7 +353,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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210171130.q9HBUQg7060435>