]>
Commit | Line | Data |
---|---|---|
1 | Index: boost_1_27_0.patch | |
2 | =================================================================== | |
3 | RCS file: /cvs/external/boost/boost_1_27_0.patch,v | |
4 | retrieving revision 1.4.4.1 | |
5 | diff -u -r1.4.4.1 boost_1_27_0.patch | |
6 | --- boost/boost_1_27_0.patch 28 Jul 2003 16:55:40 -0000 1.4.4.1 | |
7 | +++ boost/boost_1_27_0.patch 2 Aug 2003 12:48:16 -0000 | |
8 | @@ -157,7 +157,7 @@ | |
9 | --- misc/build/boost_1_27_0/boost/detail/linux_atomic.h Wed May 7 11:32:48 2003 | |
10 | *************** | |
11 | *** 0 **** | |
12 | ---- 1,181 ---- | |
13 | +--- 1,119 ---- | |
14 | + #ifndef _LINUX_ATOMIC_H_ | |
15 | + #define _LINUX_ATOMIC_H_ | |
16 | + | |
17 | @@ -268,75 +268,24 @@ | |
18 | + __CS_LOOP(old_val, new_val, v, 1, "sr"); | |
19 | + return new_val; | |
20 | +} | |
21 | -+#elif defined ( SPARC ) | |
22 | + | |
23 | -+ | |
24 | -+#define atomic_set(v, i) (((v)->aVal) = ((i) << 8)) | |
25 | -+ | |
26 | -+static __inline__ int __atomic_add(int i, atomic_t *v) | |
27 | -+{ | |
28 | -+ register volatile int *ptr asm("g1"); | |
29 | -+ register int increment asm("g2"); | |
30 | -+ | |
31 | -+ ptr = &v->aVal; | |
32 | -+ increment = i; | |
33 | -+ | |
34 | -+ __asm__ __volatile__( | |
35 | -+ "mov %%o7, %%g4\n\t" | |
36 | -+ "call ___atomic_add\n\t" | |
37 | -+ " add %%o7, 8, %%o7\n" | |
38 | -+ : "=&r" (increment) | |
39 | -+ : "0" (increment), "r" (ptr) | |
40 | -+ : "g3", "g4", "g7", "memory", "cc"); | |
41 | -+ | |
42 | -+ return increment; | |
43 | -+} | |
44 | -+ | |
45 | -+static __inline__ int __atomic_sub(int i, atomic_t *v) | |
46 | -+{ | |
47 | -+ register volatile int *ptr asm("g1"); | |
48 | -+ register int increment asm("g2"); | |
49 | -+ | |
50 | -+ ptr = &v->aVal; | |
51 | -+ increment = i; | |
52 | -+ | |
53 | -+ __asm__ __volatile__( | |
54 | -+ "mov %%o7, %%g4\n\t" | |
55 | -+ "call ___atomic_sub\n\t" | |
56 | -+ " add %%o7, 8, %%o7\n" | |
57 | -+ : "=&r" (increment) | |
58 | -+ : "0" (increment), "r" (ptr) | |
59 | -+ : "g3", "g4", "g7", "memory", "cc"); | |
60 | -+ | |
61 | -+ return increment; | |
62 | -+} | |
63 | -+ | |
64 | -+#define atomic_add(i, v) ((void)__atomic_add((i), (v))) | |
65 | -+#define atomic_sub(i, v) ((void)__atomic_sub((i), (v))) | |
66 | -+ | |
67 | -+#define atomic_dec_return(v) __atomic_sub(1, (v)) | |
68 | -+#define atomic_inc_return(v) __atomic_add(1, (v)) | |
69 | -+ | |
70 | -+#define atomic_sub_and_test(i, v) (__atomic_sub((i), (v)) == 0) | |
71 | -+#define atomic_dec_and_test(v) (__atomic_sub(1, (v)) == 0) | |
72 | -+ | |
73 | -+#define atomic_inc(v) ((void)__atomic_add(1, (v))) | |
74 | -+#define atomic_dec(v) ((void)__atomic_sub(1, (v))) | |
75 | -+ | |
76 | -+#define atomic_add_negative(i, v) (__atomic_add((i), (v)) < 0) | |
77 | -+ | |
78 | -+/* Atomic operations are already serializing */ | |
79 | -+#define smp_mb__before_atomic_dec() barrier() | |
80 | -+#define smp_mb__after_atomic_dec() barrier() | |
81 | -+#define smp_mb__before_atomic_inc() barrier() | |
82 | -+#define smp_mb__after_atomic_inc() barrier() | |
83 | -+ | |
84 | +#endif | |
85 | + #else | |
86 | -+ | |
87 | ++ | |
88 | + #error - need to define your processors atomic inc and dec here | |
89 | -+ | |
90 | ++ | |
91 | + #endif | |
92 | + | |
93 | -+ | |
94 | ++ | |
95 | + #endif | |
96 | +--- misc/build/boost_1_27_0/boost/detail/atomic_count.hpp.orig 2002-02-08 02:26:13.000000000 +1100 | |
97 | ++++ misc/build/boost_1_27_0/boost/detail/atomic_count.hpp 2003-08-02 22:38:16.000000000 +1000 | |
98 | +@@ -93,7 +93,7 @@ | |
99 | + | |
100 | + #include <boost/detail/atomic_count_win32.hpp> | |
101 | + | |
102 | +-#elif defined(linux) || defined(__linux) || defined(__linux__) | |
103 | ++#elif (defined(linux) || defined(__linux) || defined(__linux__)) && !(defined(SPARC) || defined(sparc) || defined(sparc64)) | |
104 | + | |
105 | + #include <boost/detail/atomic_count_linux.hpp> | |
106 | + |