Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Oct 2008 04:17:17 +0000 (UTC)
From:      David Xu <davidxu@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r183929 - head/sys/kern
Message-ID:  <200810160417.m9G4HHAM051248@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: davidxu
Date: Thu Oct 16 04:17:17 2008
New Revision: 183929
URL: http://svn.freebsd.org/changeset/base/183929

Log:
  Restore code wrongly removed in SVN revision 173004, it causes threaded
  process to be stuck in execv().
  
  Noticed by: delphij

Modified:
  head/sys/kern/kern_thread.c

Modified: head/sys/kern/kern_thread.c
==============================================================================
--- head/sys/kern/kern_thread.c	Thu Oct 16 01:46:01 2008	(r183928)
+++ head/sys/kern/kern_thread.c	Thu Oct 16 04:17:17 2008	(r183929)
@@ -572,8 +572,16 @@ thread_single(int mode)
 						    sleepq_abort(td2, EINTR);
 					break;
 				case SINGLE_BOUNDARY:
+					if (TD_IS_SUSPENDED(td2) &&
+					    !(td2->td_flags & TDF_BOUNDARY))
+						wakeup_swapper |=
+						    thread_unsuspend_one(td2);
+					if (TD_ON_SLEEPQ(td2) &&
+					    (td2->td_flags & TDF_SINTR))
+						wakeup_swapper |=
+						    sleepq_abort(td2, ERESTART);
 					break;
-				default:	
+				default:
 					if (TD_IS_SUSPENDED(td2)) {
 						thread_unlock(td2);
 						continue;



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