From: "Theodore Y. Ts'o" <tytso@mit.edu>
To: torvalds@transmeta.com
Cc: linux-kernel@vger.rutgers.edu
Subject: set_current_state
Date: Wed, 1 Sep 1999 16:17:07 -0400 [thread overview]
Message-ID: <199909012017.QAA18692@tsx-prime.MIT.EDU> (raw)
Hi Linus,
When I checked the serial driver integration into 2.3.16, I noticed that
one of the changes was to change
current->state = TASK_INTERRUPTIBLE;
to
set_current_state(TASK_INTERRUPTIBLE);
Looking at the sched.h header file, it's pretty clear that this is there
to protect against race conditions on SMP kernels. Which makes me
wonder why you only changed that one line, but not all of the other
lines in the driver which set current->state. Doing a quick grep over
drivers/char/*.c, I see a lot of drivers which still use "current->state
= ... " and some that use "set_current_state(...)"
Are there any circumstances where we should keep the old usage? Or
should we change them all to use set_current_state()? And if it's the
latter, would you like a patch which does a global replace of
"current->state = ..." to "set_current_state(...)", either in the serial
driver or in all files in drivers/char/*.c (where most of the old usage
seems to be concentrated).
Thanks!
- Ted
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
next reply other threads:[~1999-09-01 20:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-09-01 20:17 Theodore Y. Ts'o [this message]
1999-09-01 20:41 ` set_current_state David S. Miller
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=199909012017.QAA18692@tsx-prime.MIT.EDU \
--to=tytso@mit.edu \
--cc=linux-kernel@vger.rutgers.edu \
--cc=torvalds@transmeta.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 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®