Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 May 2016 10:31:54 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r300489 - head/sys/kern
Message-ID:  <201605231031.u4NAVspJ081312@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Mon May 23 10:31:54 2016
New Revision: 300489
URL: https://svnweb.freebsd.org/changeset/base/300489

Log:
  Use DELAY() instead of _sleep() when SCHEDULER_STOPPED() is set inside
  pause_sbt(). This allows pause() to continue working during a panic()
  which is not invoking KDB. This is useful when debugging graphics
  drivers using the LinuxKPI.
  
  Obtained from:	kmacy @
  MFC after:	1 week

Modified:
  head/sys/kern/kern_synch.c

Modified: head/sys/kern/kern_synch.c
==============================================================================
--- head/sys/kern/kern_synch.c	Mon May 23 09:44:06 2016	(r300488)
+++ head/sys/kern/kern_synch.c	Mon May 23 10:31:54 2016	(r300489)
@@ -327,7 +327,7 @@ pause_sbt(const char *wmesg, sbintime_t 
 	if (sbt == 0)
 		sbt = tick_sbt;
 
-	if (cold || kdb_active) {
+	if (cold || kdb_active || SCHEDULER_STOPPED()) {
 		/*
 		 * We delay one second at a time to avoid overflowing the
 		 * system specific DELAY() function(s):



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