From owner-freebsd-current Thu Aug 22 7:27:22 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1012C37B400 for ; Thu, 22 Aug 2002 07:27:21 -0700 (PDT) Received: from hotmail.com (f21.pav0.hotmail.com [64.4.32.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id C913243E65 for ; Thu, 22 Aug 2002 07:27:20 -0700 (PDT) (envelope-from oykai@msn.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Thu, 22 Aug 2002 07:27:20 -0700 Received: from 210.12.61.105 by pv0fd.pav0.hotmail.msn.com with HTTP; Thu, 22 Aug 2002 14:27:20 GMT X-Originating-IP: [210.12.61.105] From: "kai ouyang" To: freebsd-current@FreeBSD.ORG Subject: how to use the Giant? Date: Thu, 22 Aug 2002 22:27:20 +0800 Mime-Version: 1.0 Content-Type: text/plain; charset=gb2312; format=flowed Message-ID: X-OriginalArrivalTime: 22 Aug 2002 14:27:20.0691 (UTC) FILETIME=[064F8430:01C249E8] Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi everyone, I find many system call under the control of Giant mutex, I do not know when we should call mtx_lock(&Giant) and mtx_unlock(&Giant). I only know it is a global mutex. normally, the two functions will occure together. But, in the /sys/dev/aac/aac.c aac_host_command(struct aac_softc *sc), before kthread_exit, it only calls the mtx_lock(&Giant). If I also write one kernel thread program, should I use the Giant? Thank you! Best Regards Ouyang Kai _________________________________________________________________ 与联机的朋友进行交流,请使用 MSN Messenger: http://messenger.microsoft.com/cn/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message