Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Oct 2012 19:50:23 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r241295 - head/sys/kern
Message-ID:  <201210061950.q96JoNIk028911@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



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