From owner-freebsd-current Mon Mar 27 5:40:20 2000 Delivered-To: freebsd-current@freebsd.org Received: from sr14.nsw-remote.bigpond.net.au (sr14.nsw-remote.bigpond.net.au [24.192.3.29]) by hub.freebsd.org (Postfix) with ESMTP id F031237BB38 for ; Mon, 27 Mar 2000 05:40:15 -0800 (PST) (envelope-from areilly@nsw.bigpond.net.au) Received: from areilly.bpc-users.org (CPE-144-132-171-71.nsw.bigpond.net.au [144.132.171.71]) by sr14.nsw-remote.bigpond.net.au (Pro-8.9.3/8.9.3) with SMTP id QAA04901 for ; Mon, 27 Mar 2000 16:35:52 +1000 (EST) Received: (qmail 74234 invoked by uid 1000); 27 Mar 2000 06:35:51 -0000 From: "Andrew Reilly" Date: Mon, 27 Mar 2000 16:35:51 +1000 To: Warner Losh Cc: Matthew Dillon , Daniel Eischen , nms@otdel-1.org, freebsd-current@freebsd.org Subject: Re: Is there spinlocks/semaphores available for drivers? Message-ID: <20000327163551.A73982@gurney.reilly.home> References: <200003270607.WAA36169@apollo.backplane.com> <200003262108.QAA12802@pcnet1.pcnet.com> <200003270607.WAA36169@apollo.backplane.com> <200003270624.XAA90617@harmony.village.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i In-Reply-To: <200003270624.XAA90617@harmony.village.org> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, Mar 26, 2000 at 11:24:50PM -0700, Warner Losh wrote: > In message <200003270607.WAA36169@apollo.backplane.com> Matthew Dillon writes: > : complex. For example, using fixed-length FIFOs rather then linked lists. > : The writer manipulates the write index variable, the reader manipulates > : the read index variable. No locking is required between reader and > : writer. > > What about wrap around? You mean queue empty or queue full? That's when you have to punt to a rate-limit mechanism. Dunno what that would be in interrupt context. -- Andrew To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message