All of lore.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: noman pouigt <variksla@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: atomic read and increment question
Date: Tue, 18 Mar 2014 12:10:20 +0100	[thread overview]
Message-ID: <5328299C.10807@ladisch.de> (raw)
In-Reply-To: <CAES_P+-FDQKQSSSdJBY0ivGJtHOA6K4rYSy7z20HowUUVcHdJQ@mail.gmail.com>

noman pouigt wrote:
> x = 1;
> temp = atomic_read_increment(x);

atomic_set(&x, 1);
temp = atomic_inc_return(&x);

> I looked through the documentation for atomic
> operations but couldn't find out the api

Not everything is fully documented.

Look through include/asm-generic/atomic.h.


Regards,
Clemens

  reply	other threads:[~2014-03-18 11:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-18  8:26 atomic read and increment question noman pouigt
2014-03-18 11:10 ` Clemens Ladisch [this message]
2014-03-18 12:52 ` Paul E. McKenney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5328299C.10807@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=variksla@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.