Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Jun 2002 09:44:21 -0700 (PDT)
From:      Brian Feldman <green@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 12831 for review
Message-ID:  <200206131644.g5DGiLB33869@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=12831

Change 12831 by green@green_laptop_1 on 2002/06/13 09:44:08

	The zombie_thread_lock can't be a MTX_SPIN if you want to sleep with
	it held.

Affected files ...

... //depot/projects/kse/sys/kern/kern_thread.c#66 edit

Differences ...

==== //depot/projects/kse/sys/kern/kern_thread.c#66 (text+ko) ====

@@ -75,7 +75,7 @@
 tdlist_head_t zombie_threads = TAILQ_HEAD_INITIALIZER(zombie_threads);
 struct mtx zombie_thread_lock;
 MTX_SYSINIT(zombie_thread_lock, &zombie_thread_lock,
-    "zombie_thread_lock", MTX_SPIN);
+    "zombie_thread_lock", MTX_DEF);
 
 /*
  * Pepare a thread for use.
@@ -241,9 +241,9 @@
 void
 thread_stash(struct thread *td)
 {
-	mtx_lock_spin(&zombie_thread_lock);
+	mtx_lock(&zombie_thread_lock);
 	TAILQ_INSERT_HEAD(&zombie_threads, td, td_runq);
-	mtx_unlock_spin(&zombie_thread_lock);
+	mtx_unlock(&zombie_thread_lock);
 }
 
 /* 
@@ -254,7 +254,7 @@
 {
 	struct thread *td_reaped, *td_next;
 
-	mtx_lock_spin(&zombie_thread_lock);
+	mtx_lock(&zombie_thread_lock);
 	td_reaped = TAILQ_FIRST(&zombie_threads);
 	while (td_reaped) {
 		td_next = TAILQ_NEXT(td_reaped, td_runq);
@@ -262,7 +262,7 @@
 		thread_free(td_reaped);
 		td_reaped = td_next;
 	}
-	mtx_unlock_spin(&zombie_thread_lock);
+	mtx_unlock(&zombie_thread_lock);
 	
 }
 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




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