From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 10 02:05:35 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BE50E16A4CE for ; Thu, 10 Mar 2005 02:05:35 +0000 (GMT) Received: from smtp.ucla.edu (smtp.ucla.edu [169.232.48.138]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8B9D943D55 for ; Thu, 10 Mar 2005 02:05:35 +0000 (GMT) (envelope-from ashcs@ucla.edu) Received: from mail.ucla.edu (mail.ucla.edu [169.232.48.135]) by smtp.ucla.edu (8.13.1/8.13.1) with ESMTP id j2A25ZqH004184 for ; Wed, 9 Mar 2005 18:05:35 -0800 Received: from ash (s226-171.resnet.ucla.edu [164.67.226.171]) (authenticated bits=0) by mail.ucla.edu (8.13.3/8.13.3) with ESMTP id j2A25YB7018245 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for ; Wed, 9 Mar 2005 18:05:35 -0800 Message-ID: <001b01c52515$a88c6000$abe243a4@ash> From: "Ashwin Chandra" To: Date: Wed, 9 Mar 2005 18:05:39 -0800 MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Probable-Spam: no X-Spam-Hits: 0.18 X-Scanned-By: smtp.ucla.edu Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: Thread Suspensions?? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Mar 2005 02:05:36 -0000 So does anyone know why the following code in the scheduler causes = normal processes like bash and cron to be suspended as well? I have = printed out all the proc names in this loop (inside the if statements) = and none of them are bash or cron. FOREACH_THREAD_IN_PROC(p, td) { if(p->p_km_switch =3D=3D P_NON_RUN) if( !TD_IS_SUSPENDED(td) ) TD_SET_SUSPENDED(td); =20 else if(p->p_km_switch =3D=3D P_RUN) if(TD_IS_SUSPENDED(td)) TD_CLR_SUSPENDED(td); }