From: Ryan Bradetich <rbradetich@uswest.net>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] rename member variable count to disabled in struct tasklet_struct
Date: 30 Nov 2001 20:09:49 -0700 [thread overview]
Message-ID: <1007176189.11991.16.camel@beavis> (raw)
In a previous email:
http://marc.theaimsgroup.com/?l=linux-kernel&m=100710086202226&w=2
I asked about the possibility of renaming the member variable count to
disabled in the struct tasklet_struct. I didn't get any responses to my
question so I thought I'd try asking the question a different way :)
This patch does not make any functional changes to the kernel, but I do
believe it makes the tasklet code more readable.
I have tested this against the 2.4.16 kernel.
Thanks,
- Ryan
--- include/linux/interrupt.h 2001/11/09 23:37:14 1.9
+++ include/linux/interrupt.h 2001/12/01 02:09:32
@@ -104,7 +104,7 @@ struct tasklet_struct
{
struct tasklet_struct *next;
unsigned long state;
- atomic_t count;
+ atomic_t disabled;
void (*func)(unsigned long);
unsigned long data;
};
@@ -171,7 +171,7 @@ static inline void tasklet_hi_schedule(s
static inline void tasklet_disable_nosync(struct tasklet_struct *t)
{
- atomic_inc(&t->count);
+ atomic_inc(&t->disabled);
smp_mb__after_atomic_inc();
}
@@ -185,13 +185,13 @@ static inline void tasklet_disable(struc
static inline void tasklet_enable(struct tasklet_struct *t)
{
smp_mb__before_atomic_dec();
- atomic_dec(&t->count);
+ atomic_dec(&t->disabled);
}
static inline void tasklet_hi_enable(struct tasklet_struct *t)
{
smp_mb__before_atomic_dec();
- atomic_dec(&t->count);
+ atomic_dec(&t->disabled);
}
extern void tasklet_kill(struct tasklet_struct *t);
--- kernel/softirq.c 2001/11/09 23:37:17 1.9
+++ kernel/softirq.c 2001/12/01 02:09:32
@@ -189,7 +189,7 @@ static void tasklet_action(struct softir
list = list->next;
if (tasklet_trylock(t)) {
- if (!atomic_read(&t->count)) {
+ if (!atomic_read(&t->disabled)) {
if
(!test_and_clear_bit(TASKLET_STATE_SCHED, &t->state))
BUG();
t->func(t->data);
@@ -223,7 +223,7 @@ static void tasklet_hi_action(struct sof
list = list->next;
if (tasklet_trylock(t)) {
- if (!atomic_read(&t->count)) {
+ if (!atomic_read(&t->disabled)) {
if
(!test_and_clear_bit(TASKLET_STATE_SCHED, &t->state))
BUG();
t->func(t->data);
@@ -247,7 +247,7 @@ void tasklet_init(struct tasklet_struct
{
t->next = NULL;
t->state = 0;
- atomic_set(&t->count, 0);
+ atomic_set(&t->disabled, 0);
t->func = func;
t->data = data;
}
reply other threads:[~2001-12-01 3:10 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=1007176189.11991.16.camel@beavis \
--to=rbradetich@uswest.net \
--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 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.