Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Oct 2011 10:35:18 -0400
From:      Ryan Stone <rysto32@gmail.com>
To:        lev@freebsd.org
Cc:        hackers@freebsd.org
Subject:   Re: Atomic increment and get?
Message-ID:  <CAFMmRNzXAFhdoq5=JRyxz_aRbbc%2BXzDGDpwk2hNoGS1YTvijsQ@mail.gmail.com>
In-Reply-To: <558829232.20111003133754@serebryakov.spb.ru>
References:  <558829232.20111003133754@serebryakov.spb.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
2011/10/3 Lev Serebryakov <lev@freebsd.org>:
> Hello, Hackers.
>
> =A0Is here atomic increment and get (or add and get) operation in
> =A0kernel? I cannot find one. Here is atomic_add_32(), but it doesn't
> =A0return result. And here is no atomic_add_64() on 32 bit system :(

man atomic gives all of the atomic primitives provided in the kernel.
In this case you want atomic_fetchadd_X.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFMmRNzXAFhdoq5=JRyxz_aRbbc%2BXzDGDpwk2hNoGS1YTvijsQ>