From: Felipe W Damasio <felipewd@terra.com.br>
To: kernel-janitors@vger.kernel.org
Subject: Re: [Kernel-janitors] Re: set_current_state
Date: Wed, 30 Jun 2004 12:30:12 +0000 [thread overview]
Message-ID: <40E2B254.2030603@terra.com.br> (raw)
In-Reply-To: <20040627223356.GA1653@masina>
[-- Attachment #1: Type: text/plain, Size: 841 bytes --]
Anupam Kapoor wrote:
> hmm, i am not sure about this but does it make sense to use
> __set_current_state for functions that have fastcall ? and use
> set_current_state for others ?
It's not _that_ simple. We need set_current_state to racing if
instructions are reordered.
__set_current_state should *always* be used when setting to TASK_RUNNING.
But since function calls act also as memory barriers and most of the
locking primitives also have memory barriers built into them, there are
few places where we actually need set_current_state (rather than
__set_current_state).
Please check the LKML archives for further explanations.
But in short: No, it's not just a blind search-and-replace kind of thing.
Cheers,
Felipe
--
It's most certainly GNU/Linux, not Linux. Read more at
http://www.gnu.org/gnu/why-gnu-linux.html
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
next prev parent reply other threads:[~2004-06-30 12:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-27 22:33 [Kernel-janitors] Re: set_current_state Domen Puncer
2004-06-28 13:33 ` Anupam Kapoor
2004-06-28 14:33 ` Domen Puncer
2004-06-30 11:09 ` Anupam Kapoor
2004-06-30 12:30 ` Felipe W Damasio [this message]
2004-06-30 12:56 ` Anupam Kapoor
2004-06-30 12:58 ` Felipe W Damasio
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=40E2B254.2030603@terra.com.br \
--to=felipewd@terra.com.br \
--cc=kernel-janitors@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 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.