Index: s_lock.h =================================================================== RCS file: /projects/cvsroot/pgsql/src/include/storage/s_lock.h,v retrieving revision 1.115.2.1 diff -c -r1.115.2.1 s_lock.h *** s_lock.h 4 Nov 2003 09:43:56 -0000 1.115.2.1 --- s_lock.h 3 Oct 2006 10:38:28 -0000 *************** *** 117,122 **** --- 117,124 ---- #if defined(__ia64__) || defined(__ia64) #define TAS(lock) tas(lock) + #ifndef __INTEL_COMPILER + static __inline__ int tas(volatile slock_t *lock) { *************** *** 131,136 **** --- 133,151 ---- return (int) ret; } + #else /* __INTEL_COMPILER */ + + static __inline__ int + tas(volatile slock_t *lock) + { + int ret; + + ret = _InterlockedExchange(lock,1); /* this is a xchg asm macro */ + + return ret; + } + + #endif /* __INTEL_COMPILER */ #endif /* __ia64__ || __ia64 */