[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Atomic operations



On 20101119_175943, T. Alex Chen wrote:
> I post the following message on debian-devel mailing list but someone says it is 
> the wrong one so I post it here again.
> Please bear with me if you have already seen it.
> ==========
> I want to do atomic operation and find there is already such implementation in 
> Linux, e.g. atomic_add, atomic_set, atomic_cmpset, etc, after I google on the 
> Web. I find a libatomic-ops-dev package and install it. But there is still no 
> man page after the installation. Did I install the right package? Where can I 
> get the man page of these atomic operations?
> 
> Or maybe these operations are only for kernel and not for user applications? ( 
> Highly unlikely, right? )
> Alex 
> 

atomic_set is part of the Linux API (applications programming
interface). It is intended for use in application programs that make
'system calls'. So is it "only_for kernel"? No, and yes. 

The idea of atomic operations is used at many several levels of
abstraction in computer software design. The way you have phrased your
question leads me to believe that you may not be aware of the full
complexity of a proper answer to your question. Maybe you really need
a DBMS system like PostgreSQL in order to do the atomic operation that
you actually want to do.

And the way I learned what what 'atomic_set' is, is by Googling it and
finding the man page on the web. Lack of man pages in Debian is almost
never a total lack of man page access for the Debian user. Some man
pages have wierd copyright restrictions. For me, reading man pages on
the web often tells me that the package is not at all what I want to
clutter my system with.

Peace
-- 
Paul E Condon           
pecondon@mesanetworks.net


Reply to: