From owner-freebsd-hackers Wed Aug 7 0:15:27 2002 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 7D61937B400 for ; Wed, 7 Aug 2002 00:15:25 -0700 (PDT) Received: from web21110.mail.yahoo.com (web21110.mail.yahoo.com [216.136.227.112]) by mx1.FreeBSD.org (Postfix) with SMTP id 32E6343E3B for ; Wed, 7 Aug 2002 00:15:25 -0700 (PDT) (envelope-from hitmaster2k@yahoo.com) Message-ID: <20020807071524.15758.qmail@web21110.mail.yahoo.com> Received: from [62.254.0.5] by web21110.mail.yahoo.com via HTTP; Wed, 07 Aug 2002 00:15:24 PDT Date: Wed, 7 Aug 2002 00:15:24 -0700 (PDT) From: Hiten Pandya Reply-To: hiten@uk.FreeBSD.org Subject: Re: mutex in kernel modules? To: Ed Yu , freebsd-hackers@freebsd.org In-Reply-To: <20020806182343.89911.qmail@web20702.mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --- Ed Yu wrote: > Hi, what mutex is available when writing kernel > modules? I want something like declaring of > "semaphore" and be able to lock and unlock it. I found > simplelock in . I saw some modules using > struct mtx but I couldn't find it anywhere in the > header files. Man pages for both of them do not show > anything. I'm running FreeBSD-stable. Any help would > be greatly appreciated. Thank you. You cannot have mutexes in FreeBSD-STABLE. All the Premptive Multitasking and the related jazz is being done in FreeBSD-CURRENT. Please checkout: http://www.FreeBSD.org/smp -- Information about Locking and stuff http://www.lemis.com/~grog/SMPng/AOSS2/index.html -- FreeBSD SMP Article And you can checkout the man pages mutex(9), sx(9), mtx_pool(9), sema(9) etc. at: http://www.freebsd.org/cgi/man.cgi?query=&manpath=FreeBSD+5.0-current This is the web interface to the FreeBSD 5.0 Manual Pages. Hope this helps. -- Hiten __________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message