]> git.pld-linux.org Git - packages/amarok.git/blame - amarok-helixplayer-morearchs.patch
- up to 1.4.1 stable
[packages/amarok.git] / amarok-helixplayer-morearchs.patch
CommitLineData
699996fd
JB
1--- amarok/amarok/src/engine/helix/helix-sp/helix-include/common/include/atomicbase.h.orig 2005-11-03 22:22:27.000000000 +0100
2+++ amarok/amarok/src/engine/helix/helix-sp/helix-include/common/include/atomicbase.h 2005-11-03 23:14:46.000000000 +0100
3@@ -179,7 +179,7 @@
4 #elif defined (__sparc__) && defined (__GNUC__)
5
6 /* Increment by 1 */
7-inline void
8+static inline void
9 HXAtomicIncUINT32(UINT32* pNum)
10 {
11 __asm__ __volatile__(\
12@@ -200,7 +200,7 @@
13 }
14
15 /* Decrement by 1 */
16-inline void
17+static inline void
18 HXAtomicDecUINT32(UINT32* pNum)
19 {
20 __asm__ __volatile__(
21@@ -221,7 +221,7 @@
22 }
23
24 /* Increment by 1 and return new value */
25-inline UINT32
26+static inline UINT32
27 HXAtomicIncRetUINT32(UINT32* pNum)
28 {
29 volatile UINT32 ulRet;
30@@ -245,7 +245,7 @@
31 }
32
33 /* Decrement by 1 and return new value */
34-inline UINT32
35+static inline UINT32
36 HXAtomicDecRetUINT32(UINT32* pNum)
37 { volatile UINT32 ulRet;
38 __asm__ __volatile__(
39@@ -268,7 +268,7 @@
40 }
41
42 /* Add n */
43-inline void
44+static inline void
45 HXAtomicAddUINT32(UINT32* pNum, UINT32 ulNum)
46 {
47 __asm__ __volatile__(
48@@ -290,7 +290,7 @@
49 }
50
51 /* Subtract n */
52-inline void
53+static inline void
54 HXAtomicSubUINT32(UINT32* pNum, UINT32 ulNum)
55 {
56 __asm__ __volatile__(
57@@ -312,7 +312,7 @@
58 }
59
60 /* Add n and return new value */
61-inline UINT32
62+static inline UINT32
63 HXAtomicAddRetUINT32(UINT32* pNum, UINT32 ulNum)
64 {
65 volatile UINT32 ulRet; \
66@@ -337,7 +337,7 @@
67 }
68
69 /* Subtract n and return new value */
70-inline UINT32
71+static inline UINT32
72 HXAtomicSubRetUINT32(UINT32* pNum, UINT32 ulNum)
73 { volatile UINT32 ulRet;
74 __asm__ __volatile__(
75@@ -360,14 +360,14 @@
76 return ulRet;
77 }
78
79-inline void HXAtomicIncINT32(INT32* p) { HXAtomicIncUINT32((UINT32*)p); }
80-inline void HXAtomicDecINT32(INT32* p) { HXAtomicDecUINT32((UINT32*)p); }
81-inline void HXAtomicAddINT32(INT32* p, INT32 n) { HXAtomicAddUINT32((UINT32*)p, (UINT32)n); }
82-inline void HXAtomicSubINT32(INT32* p, INT32 n) { HXAtomicSubUINT32((UINT32*)p, (UINT32)n); }
83-inline INT32 HXAtomicIncRetINT32(INT32* p) { return HXAtomicIncRetUINT32((UINT32*)p); }
84-inline INT32 HXAtomicDecRetINT32(INT32* p) { return HXAtomicDecRetUINT32((UINT32*)p); }
85-inline INT32 HXAtomicAddRetINT32(INT32* p, INT32 n) { return HXAtomicAddRetUINT32((UINT32*)p, (UINT32)n); }
86-inline INT32 HXAtomicSubRetINT32(INT32* p, INT32 n) { return HXAtomicSubRetUINT32((UINT32*)p, (UINT32)n); }
87+static inline void HXAtomicIncINT32(INT32* p) { HXAtomicIncUINT32((UINT32*)p); }
88+static inline void HXAtomicDecINT32(INT32* p) { HXAtomicDecUINT32((UINT32*)p); }
89+static inline void HXAtomicAddINT32(INT32* p, INT32 n) { HXAtomicAddUINT32((UINT32*)p, (UINT32)n); }
90+static inline void HXAtomicSubINT32(INT32* p, INT32 n) { HXAtomicSubUINT32((UINT32*)p, (UINT32)n); }
91+static inline INT32 HXAtomicIncRetINT32(INT32* p) { return HXAtomicIncRetUINT32((UINT32*)p); }
92+static inline INT32 HXAtomicDecRetINT32(INT32* p) { return HXAtomicDecRetUINT32((UINT32*)p); }
93+static inline INT32 HXAtomicAddRetINT32(INT32* p, INT32 n) { return HXAtomicAddRetUINT32((UINT32*)p, (UINT32)n); }
94+static inline INT32 HXAtomicSubRetINT32(INT32* p, INT32 n) { return HXAtomicSubRetUINT32((UINT32*)p, (UINT32)n); }
95
96
97
98@@ -547,7 +547,7 @@
99 #elif defined(__GNUC__) && !defined(_OPENBSD) && \
100 (__GNUC__>2 || (__GNUC__==2 && __GNUC_MINOR__>=95)) && \
101 ( defined (__i486__) || defined (__i586__) || defined (__i686__) || \
102- defined (__pentium__) || defined (__pentiumpro__))
103+ defined (__pentium__) || defined (__pentiumpro__) || defined (__pentium4__) || defined (__athlon__))
104
105 /* Increment by 1 */
106 static __inline__ void
107@@ -855,6 +855,114 @@
108 */
109 #elif defined (__alpha)
110
111+# ifdef __GNUC__
112+
113+/* Increment by 1 and return new value */
114+static inline INT32
115+HXAtomicIncRetINT32(INT32* pNum)
116+{
117+ asm volatile (
118+ "10: ldl_l $1, %0\n" // Load-lock value into a register
119+ " addl $1, 1, $1\n" // Increment value
120+ " stl_c $1, %0\n" // Save new value into *pNum
121+ " beq $1, 10b\n" // Retry if sequence failed
122+ : "=m" (*pNum) : "m" (*pNum) : "$1");
123+ return *pNum;
124+}
125+
126+/* Decrement by 1 and return new value */
127+static inline INT32
128+HXAtomicDecRetINT32(INT32* pNum)
129+{
130+ asm volatile (
131+ "10: ldl_l $1, %0\n" // Load-lock value into a register
132+ " subl $1, 1, $1\n" // Decrement value
133+ " stl_c $1, %0\n" // Save new value into *pNum
134+ " beq $1, 10b\n" // Retry if sequence failed
135+ : "=m" (*pNum) : "m" (*pNum) : "$1");
136+ return *pNum;
137+}
138+
139+/* Add n and return new value */
140+static inline INT32
141+HXAtomicAddRetINT32(INT32* pNum, INT32 n)
142+{
143+ asm volatile (
144+ "10: ldl_l $1, %0\n" // Load-lock value into a register
145+ " addl $1, %1, $1\n" // Add n to value
146+ " stl_c $1, %0\n" // Save new value into *pNum
147+ " beq $1, 10b\n" // Retry if sequence failed
148+ : "=m" (*pNum) : "r" (n), "m" (*pNum) : "$1");
149+ return *pNum;
150+}
151+
152+/* Subtract n and return new value */
153+static inline INT32
154+HXAtomicSubRetINT32(INT32* pNum, INT32 n)
155+{
156+ asm volatile (
157+ "10: ldl_l $1, %0\n" // Load-lock value into a register
158+ " subl $1, %1, $1\n" // Subtract n from value
159+ " stl_c $1, %0\n" // Save new value into *pNum
160+ " beq $1, 10b\n" // Retry if sequence failed
161+ : "=m" (*pNum) : "r" (n), "m" (*pNum) : "$1");
162+ return *pNum;
163+}
164+
165+/* Increment by 1 and return new value */
166+static inline UINT32
167+HXAtomicIncRetUINT32(UINT32* pNum)
168+{
169+ asm volatile (
170+ "10: ldl_l $1, %0\n" // Load-lock value into a register
171+ " addl $1, 1, $1\n" // Increment value
172+ " stl_c $1, %0\n" // Save new value into *pNum
173+ " beq $1, 10b\n" // Retry if sequence failed
174+ : "=m" (*pNum) : "m" (*pNum) : "$1");
175+ return *pNum;
176+}
177+
178+/* Decrement by 1 and return new value */
179+static inline UINT32
180+HXAtomicDecRetUINT32(UINT32* pNum)
181+{
182+ asm volatile (
183+ "10: ldl_l $1, %0\n" // Load-lock value into a register
184+ " subl $1, 1, $1\n" // Decrement value
185+ " stl_c $1, %0\n" // Save new value into *pNum
186+ " beq $1, 10b\n" // Retry if sequence failed
187+ : "=m" (*pNum) : "m" (*pNum) : "$1");
188+ return *pNum;
189+}
190+
191+/* Add n and return new value */
192+static inline UINT32
193+HXAtomicAddRetUINT32(UINT32* pNum, UINT32 n)
194+{
195+ asm volatile (
196+ "10: ldl_l $1, %0\n" // Load-lock value into a register
197+ " addl $1, %1, $1\n" // Add n to value
198+ " stl_c $1, %0\n" // Save new value into *pNum
199+ " beq $1, 10b\n" // Retry if sequence failed
200+ : "=m" (*pNum) : "r" (n), "m" (*pNum) : "$1");
201+ return *pNum;
202+}
203+
204+/* Subtract n and return new value */
205+static inline UINT32
206+HXAtomicSubRetUINT32(UINT32* pNum, UINT32 n)
207+{
208+ asm volatile (
209+ "10: ldl_l $1, %0\n" // Load-lock value into a register
210+ " subl $1, %1, $1\n" // Subtract n from value
211+ " stl_c $1, %0\n" // Save new value into *pNum
212+ " beq $1, 10b\n" // Retry if sequence failed
213+ : "=m" (*pNum) : "r" (n), "m" (*pNum) : "$1");
214+ return *pNum;
215+}
216+
217+# else
218+
219 #include <c_asm.h>
220
221 /* Increment by 1 and return new value */
222@@ -961,6 +1067,8 @@
223 , pNum, n);
224 }
225
226+# endif
227+
228 #define HXAtomicIncINT32(p) HXAtomicIncRetINT32((p))
229 #define HXAtomicDecINT32(p) HXAtomicDecRetINT32((p))
230 #define HXAtomicAddINT32(p,n) HXAtomicAddRetINT32((p),(n))
This page took 0.070161 seconds and 4 git commands to generate.