Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Dec 2000 14:07:46 -0800
From:      Jason Evans <jasone@canonware.com>
To:        Dan Eischen <eischen@vigrid.com>
Cc:        smp@freebsd.org
Subject:   Re: Userland atomic assignments
Message-ID:  <20001207140746.O2312@canonware.com>
In-Reply-To: <3A2FFDD9.F17C1165@vigrid.com>; from eischen@vigrid.com on Thu, Dec 07, 2000 at 04:15:05PM -0500
References:  <3A2FFDD9.F17C1165@vigrid.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Dec 07, 2000 at 04:15:05PM -0500, Dan Eischen wrote:
> What kind of atomic operations can we get in userland?
> If I have a singly linked list, where nodes are only added
> to the head or the tail and they are never removed, can I
> walk the list without fear of catching a bad head or
> node->next (when I'm at the end of the list) pointer?
> 
> In other words, can I get an atomic_set_ptr() operation
> on each platform?  I can also see the need for an
> atomic_set_int32() operation.

I don't think we have an official API for atomic operations in userland.
There is <machine/atomic.h>, but it isn't documented as a userland API.  I
agree that we need this or something similar in userland though.  Any ideas
on the cleanest way to provide this?

Jason


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-smp" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001207140746.O2312>