From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 25 07:09:23 2004 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 9B2C216A4CE for ; Wed, 25 Aug 2004 07:09:23 +0000 (GMT) Received: from hotmail.com (bay17-dav11.bay17.hotmail.com [64.4.43.191]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8EBA343D3F for ; Wed, 25 Aug 2004 07:09:23 +0000 (GMT) (envelope-from yangshazhou@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 25 Aug 2004 00:09:22 -0700 Received: from 61.187.16.2 by bay17-dav11.bay17.hotmail.com with DAV; Wed, 25 Aug 2004 07:09:22 +0000 X-Originating-IP: [61.187.16.2] X-Originating-Email: [yangshazhou@hotmail.com] X-Sender: yangshazhou@hotmail.com From: To: Date: Wed, 25 Aug 2004 15:06:51 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Message-ID: X-OriginalArrivalTime: 25 Aug 2004 07:09:22.0718 (UTC) FILETIME=[729F8BE0:01C48A72] X-Mailman-Approved-At: Wed, 25 Aug 2004 11:58:39 +0000 Subject: yield() in kernel CAN'T yield control for MOD_LOAD thread 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: Wed, 25 Aug 2004 07:09:23 -0000 Hi all, This problem delay me for quite a long time. I've built two klds, I'd like to see the result one's running to the other's. In one kld's MOD_LOAD subroutine, I make a long 'for' loop, in which it DELAY(1000) and then call yield(curthread,NULL). When the module was loaded by kldload, the system failed to response until the loop quit. The loop seems like that: for(i=0;i<8000;i++){ ...... DELAY(1000); yield(curthread,NULL); } My system is 5.2.1-release. Thanks.