mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: FabF <Fabian.Frederick@skynet.be>
To: lkml <linux-kernel@vger.kernel.org>
Subject: [ OFFTOPIC & trivial ] spinlock & atomic
Date: Tue, 11 May 2004 16:21:08 +0200	[thread overview]
Message-ID: <1084285268.12321.6.camel@bluerhyme.real3> (raw)

Hi,

	Someone could explain why we have following code in kernel ?

spinlock (x)
atomic_inc (x->y)
spinunlock(x)

	I mean y being part of x should be atomically modified with a "normal"
operation ? What am I missing ? Does it mean we defined y atomic_t in
order to have atomic operations elsewhere without the lock held ? Simply
?

Regards,
FabF


                 reply	other threads:[~2004-05-13 21:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1084285268.12321.6.camel@bluerhyme.real3 \
    --to=fabian.frederick@skynet.be \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®