diff options
| author | Andrew Morton <akpm@digeo.com> | 2003-03-22 07:35:13 -0800 |
|---|---|---|
| committer | David S. Miller <davem@kernel.bkbits.net> | 2003-03-22 07:35:13 -0800 |
| commit | b39fe640cbe3492699e9d2263f2a9858db2d3024 (patch) | |
| tree | 7eee36231b3ee3a2d0862cd70b4c88418e1c7d52 /include/linux | |
| parent | 7dbfb92c19aa738572a41870e3b3f1c15f88777b (diff) | |
[PATCH] make list.h barriers smp-only
From: Dipankar Sarma <dipankar@in.ibm.com>
This patch makes the list macros use smp-only version of the barriers,
no need to hurt UP performance.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/list.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/list.h b/include/linux/list.h index f082a59aa3c8..4178fd498c89 100644 --- a/include/linux/list.h +++ b/include/linux/list.h @@ -84,7 +84,7 @@ static __inline__ void __list_add_rcu(struct list_head * new, { new->next = next; new->prev = prev; - wmb(); + smp_wmb(); next->prev = new; prev->next = new; } @@ -303,11 +303,11 @@ static inline void list_splice_init(struct list_head *list, */ #define list_for_each_rcu(pos, head) \ for (pos = (head)->next, prefetch(pos->next); pos != (head); \ - pos = pos->next, ({ read_barrier_depends(); 0;}), prefetch(pos->next)) + pos = pos->next, ({ smp_read_barrier_depends(); 0;}), prefetch(pos->next)) #define __list_for_each_rcu(pos, head) \ for (pos = (head)->next; pos != (head); \ - pos = pos->next, ({ read_barrier_depends(); 0;})) + pos = pos->next, ({ smp_read_barrier_depends(); 0;})) /** * list_for_each_safe_rcu - iterate over an rcu-protected list safe @@ -318,7 +318,7 @@ static inline void list_splice_init(struct list_head *list, */ #define list_for_each_safe_rcu(pos, n, head) \ for (pos = (head)->next, n = pos->next; pos != (head); \ - pos = n, ({ read_barrier_depends(); 0;}), n = pos->next) + pos = n, ({ smp_read_barrier_depends(); 0;}), n = pos->next) /* * Double linked lists with a single pointer list head. |
