Re: missing atomic_exchg_*() in the atomic.h API ?

From: John Baldwin <jhb_at_freebsd.org>
Date: Tue, 7 Apr 2009 10:24:07 -0400
On Monday 06 April 2009 4:32:38 am Luigi Rizzo wrote:
> while looking at the functions in atomic.h i noticed that
> there seems to be no atomic_exchg_*() in the API, though this
> is a supported function in most/all supported archiectures,
> and a useful function. We do have atomic_readandclear() which
> uses the same underlying CPU instruction.
> 
> Again, any objection if i add it ?

Mostly b/c there hasn't been a need for it to date.  I would probably spell 
out 'exchange' btw.

-- 
John Baldwin
Received on Tue Apr 07 2009 - 12:29:03 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:45 UTC