From 891c9d56f56230d12ff73f7899604a019f67e8d9 Mon Sep 17 00:00:00 2001 From: Russell King Date: Fri, 18 Oct 2002 00:36:19 -0700 Subject: [PATCH] set_task_state() UP memory barriers This fixes the UP set_task_state and set_current_state in 2.5.43 to ensure that we don't re-order loads around the store for setting task->state. This patch is from Nicolas Pitre, nico@cam.org (As a side note - 2.4.10 also contains the same problem, but 2.2 contain the memory barrier.) --- include/linux/sched.h | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'include/linux') diff --git a/include/linux/sched.h b/include/linux/sched.h index 764a3ebf3c24..b5e63d8ade25 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -106,23 +106,13 @@ extern unsigned long nr_uninterruptible(void); #define __set_task_state(tsk, state_value) \ do { (tsk)->state = (state_value); } while (0) -#ifdef CONFIG_SMP #define set_task_state(tsk, state_value) \ set_mb((tsk)->state, (state_value)) -#else -#define set_task_state(tsk, state_value) \ - __set_task_state((tsk), (state_value)) -#endif #define __set_current_state(state_value) \ do { current->state = (state_value); } while (0) -#ifdef CONFIG_SMP #define set_current_state(state_value) \ set_mb(current->state, (state_value)) -#else -#define set_current_state(state_value) \ - __set_current_state(state_value) -#endif /* * Scheduling policies -- cgit v1.2.3