[patch 2/5] tasklet: use lock bitops for tasklet lock

Previous thread: [PATCH] Define smp_call_function_mask() on uniprocessor builds by Avi Kivity on Wednesday, October 24, 2007 - 4:51 am. (3 messages)

Next thread: [patch 1/5] wait: use lock bitops for __wait_on_bit_lock by npiggin on Wednesday, October 24, 2007 - 4:13 am. (4 messages)
To: <akpm@...>
Cc: <linux-kernel@...>
Date: Wednesday, October 24, 2007 - 4:13 am

Signed-off-by: Nick Piggin <npiggin@suse.de>

---
include/linux/interrupt.h | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

Index: linux-2.6/include/linux/interrupt.h
===================================================================
--- linux-2.6.orig/include/linux/interrupt.h
+++ linux-2.6/include/linux/interrupt.h
@@ -321,13 +321,12 @@ enum
#ifdef CONFIG_SMP
static inline int tasklet_trylock(struct tasklet_struct *t)
{
- return !test_and_set_bit(TASKLET_STATE_RUN, &(t)->state);
+ return !test_and_set_bit_lock(TASKLET_STATE_RUN, &(t)->state);
}

static inline void tasklet_unlock(struct tasklet_struct *t)
{
- smp_mb__before_clear_bit();
- clear_bit(TASKLET_STATE_RUN, &(t)->state);
+ clear_bit_unlock(TASKLET_STATE_RUN, &(t)->state);
}

static inline void tasklet_unlock_wait(struct tasklet_struct *t)

--

-

Previous thread: [PATCH] Define smp_call_function_mask() on uniprocessor builds by Avi Kivity on Wednesday, October 24, 2007 - 4:51 am. (3 messages)

Next thread: [patch 1/5] wait: use lock bitops for __wait_on_bit_lock by npiggin on Wednesday, October 24, 2007 - 4:13 am. (4 messages)