Date: Mon, 27 Mar 2000 00:48:12 -0800 (PST) From: Matthew Dillon <dillon@apollo.backplane.com> To: Mike Smith <msmith@FreeBSD.ORG> Cc: Warner Losh <imp@village.org>, Mike Smith <msmith@FreeBSD.ORG>, Daniel Eischen <eischen@vigrid.com>, nms@otdel-1.org, freebsd-current@FreeBSD.ORG Subject: Re: Is there spinlocks/semaphores available for drivers? Message-ID: <200003270848.AAA37083@apollo.backplane.com> References: <200003270720.XAA05430@mass.cdrom.com>
next in thread | previous in thread | raw e-mail | index | archive | help
: :> In message <200003270639.WAA05313@mass.cdrom.com> Mike Smith writes: :> : What about it in particular? Or are you referring to overflow handling? :> :> Yes. Well, I guess I assumed it was a circular thing, and you'd need :> to have some comparison against read index, which would be racible. : :Not if you think about it; all you need are atomic read/write operations :for the indexes. Circular FIFOs are kinda neat like that. 8) : :-- :\\ Give a man a fish, and you feed him for a day. \\ Mike Smith Well, monotonically increasing (except when it wraps), and atomic writes. Atomic read-modify-writes are not required which means that no locking is needed at all, not even a 'lock' prefix (though on some architectures you have to worry about delayed commits between cpu's). -Matt Matthew Dillon <dillon@backplane.com> To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200003270848.AAA37083>