From: Paulo Marques <pmarques@grupopie.com>
To: RANDAZZO@ddc-web.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: what to use (sem/spinlock/etc)....
Date: Mon, 16 Feb 2004 15:20:27 +0000 [thread overview]
Message-ID: <4030DFBB.7010801@grupopie.com> (raw)
In-Reply-To: <89760D3F308BD41183B000508BAFAC4104B16F79@DDCNYNTD>
RANDAZZO@ddc-web.com wrote:
> I have a register on my hardware that I write to to increment a counter....
> ..all I want to do is make sure that only one "task" writes at a time,
> thus to not corrupt the value......
>
> =EXAMPLE
>
> Task A
> - Write new Value to hardware
> - Increment Hardware counter
> - DONE
>
> Task B
> - Write new Value to hardware
> - Increment Hardware counter
> - DONE
>
> ..This will most likely not occur in a inthandler, but may....
>
> ...I have to make sure that Task A is "done" before "Task B" or any others
> can do their writing....
>
> ...any opinion of what I should use....
You can read the "Unreliable Guide To Locking" from Rusty Russell at:
http://www.kernel.org/pub/linux/kernel/people/rusty/kernel-locking/
I hope this helps,
--
Paulo Marques - www.grupopie.com
"In a world without walls and fences who needs windows and gates?"
next prev parent reply other threads:[~2004-02-16 15:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-16 13:10 RANDAZZO
2004-02-16 15:20 ` Paulo Marques [this message]
2004-02-16 15:21 ` Davide Libenzi
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=4030DFBB.7010801@grupopie.com \
--to=pmarques@grupopie.com \
--cc=RANDAZZO@ddc-web.com \
--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®