File tree 1 file changed +17
-2
lines changed 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change 66
66
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
67
67
* Portions Copyright (c) 1994, Regents of the University of California
68
68
*
69
- * $PostgreSQL: pgsql/src/include/storage/s_lock.h,v 1.133 2004/12/31 22:03:42 pgsql Exp $
69
+ * $PostgreSQL: pgsql/src/include/storage/s_lock.h,v 1.134 2005/03/10 21:41:01 momjian Exp $
70
70
*
71
71
*-------------------------------------------------------------------------
72
72
*/
@@ -168,14 +168,16 @@ spin_delay(void)
168
168
#endif /* __i386__ || __x86_64__ */
169
169
170
170
171
- #if defined(__ia64__ ) || defined(__ia64 ) /* __ia64 used by ICC compiler? */
171
+ #if defined(__ia64__ ) || defined(__ia64 )
172
172
/* Intel Itanium */
173
173
#define HAS_TEST_AND_SET
174
174
175
175
typedef unsigned int slock_t ;
176
176
177
177
#define TAS (lock ) tas(lock)
178
178
179
+ #ifndef __INTEL_COMPILER
180
+
179
181
static __inline__ int
180
182
tas (volatile slock_t * lock )
181
183
{
@@ -189,6 +191,19 @@ tas(volatile slock_t *lock)
189
191
return (int ) ret ;
190
192
}
191
193
194
+ #else
195
+
196
+ static __inline__ int
197
+ tas (volatile slock_t * lock )
198
+ {
199
+ int ret ;
200
+
201
+ ret = _InterlockedExchange (lock ,1 ); /* this is a xchg asm macro */
202
+
203
+ return ret ;
204
+ }
205
+
206
+ #endif
192
207
#endif /* __ia64__ || __ia64 */
193
208
194
209
You can’t perform that action at this time.
0 commit comments