Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Jul 2010 02:43:52 +0000 (UTC)
From:      Lawrence Stewart <lstewart@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: r209785 - stable/8/sys/kern
Message-ID:  <201007080243.o682hqFO079250@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: lstewart
Date: Thu Jul  8 02:43:52 2010
New Revision: 209785
URL: http://svn.freebsd.org/changeset/base/209785

Log:
  MFC r206027:
  
  According to SLEEP(9), msleep() is deprecated in favour of mtx_sleep().
  
  Sponsored by:	FreeBSD Foundation
  Reviewed by:	dwmalone, jeff, rpaulo, rwatson (as part of a larger patch)

Modified:
  stable/8/sys/kern/kern_alq.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/kern/kern_alq.c
==============================================================================
--- stable/8/sys/kern/kern_alq.c	Thu Jul  8 02:41:55 2010	(r209784)
+++ stable/8/sys/kern/kern_alq.c	Thu Jul  8 02:43:52 2010	(r209785)
@@ -191,7 +191,7 @@ ald_daemon(void)
 	for (;;) {
 		while ((alq = LIST_FIRST(&ald_active)) == NULL &&
 		    !ald_shutingdown)
-			msleep(&ald_active, &ald_mtx, PWAIT, "aldslp", 0);
+			mtx_sleep(&ald_active, &ald_mtx, PWAIT, "aldslp", 0);
 
 		/* Don't shutdown until all active ALQs are flushed. */
 		if (ald_shutingdown && alq == NULL) {
@@ -234,12 +234,12 @@ ald_shutdown(void *arg, int howto)
 
 	/*
 	 * Wake ald_daemon so that it exits. It won't be able to do
-	 * anything until we msleep because we hold the ald_mtx.
+	 * anything until we mtx_sleep because we hold the ald_mtx.
 	 */
 	wakeup(&ald_active);
 
 	/* Wait for ald_daemon to exit. */
-	msleep(ald_proc, &ald_mtx, PWAIT, "aldslp", 0);
+	mtx_sleep(ald_proc, &ald_mtx, PWAIT, "aldslp", 0);
 
 	ALD_UNLOCK();
 }



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