From owner-freebsd-hackers Wed May 1 6:41:14 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from bulwark.switch.com (bulwark.switch.com [206.181.77.34]) by hub.freebsd.org (Postfix) with SMTP id C220E37B400 for ; Wed, 1 May 2002 06:41:10 -0700 (PDT) Received: by bulwark.switch.com; id JAA07281; Wed, 1 May 2002 09:41:09 -0400 Received: from isunix2.switch.com(199.234.168.6) by bulwark.switch.com via smap (V5.5) id xma007227; Wed, 1 May 02 09:40:20 -0400 Received: from exchptc1.switch.com ([199.234.168.10]) by isunix2.switch.com (PMDF V5.2-32 #37720) with ESMTP id <0GVF003K0PZ8XW@isunix2.switch.com> for freebsd-hackers@freebsd.org; Wed, 1 May 2002 09:40:20 -0400 (EDT) Received: by exchptc1.switch.com with Internet Mail Service (5.5.2653.19) id ; Wed, 01 May 2002 09:40:20 -0400 Content-return: allowed Date: Wed, 01 May 2002 09:40:16 -0400 From: "Nelson, Trent ." Subject: Kernel spin lock facilities To: "'freebsd-hackers@freebsd.org'" Message-id: <8F329FEDF58BD411BE5200508B10DA76056ED3A0@exchptc1.switch.com> MIME-version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-type: text/plain; charset="iso-8859-1" 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 Hi, I'm working on porting the Linux Cisco VPN client kernel module to FreeBSD. The API interface between the OS and their actual driver has four spinlock functions that operate around a handle (void *) to a ``critical section'': CNI_free_spin_lock CNI_new_spin_lock CNI_spin_lock CNI_spin_unlock Funnily enough, these wrap the Linux spinlock_t/spin_lock*() functionality quite nicely. Does the FreeBSD kernel offer such a trivial spinlock facility? If not, could anyone suggest what type of locking mechanism would best be used? Regards, Trent. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message