On Thu, Jul 11, 2002 at 11:41:04PM -0700, Alfred Perlstein wrote:
> > That's a cool idea.. haven't looked at NetBSD but am imagining the
> > mbufs would be linked in a 'ring'. This works because you never
> > care how many references are, just whether there's one or more than
> > one, and this is easy to tell by examining the ring pointer.
> > I.e., you never have to iterate through the entire ring.
> 
> That's true, but could someone explain how one can safely and
> effeciently manipulate such a structure in an SMP environment?
> 
> I'm not saying it's impossible, I'm just saying it didn't seem
> intuative to me back then, as well as now.

I'm probably speaking out of turn here (I have no idea what structure you
all are talking about), but a monodirectional ring can be safely modified
with a compare-and-exchange atomic operation.

-- 
Jonathan Mini <[EMAIL PROTECTED]>
http://www.freebsd.org/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in the body of the message

Reply via email to