Index: s_lock.h =================================================================== RCS file: /projects/cvsroot/pgsql/src/include/storage/s_lock.h,v retrieving revision 1.133.4.5 diff -c -r1.133.4.5 s_lock.h *** s_lock.h 29 Aug 2005 00:41:44 -0000 1.133.4.5 --- s_lock.h 3 Oct 2006 10:23:50 -0000 *************** *** 176,181 **** --- 176,183 ---- #define TAS(lock) tas(lock) + #ifndef __INTEL_COMPILER + static __inline__ int tas(volatile slock_t *lock) { *************** *** 189,194 **** --- 191,209 ---- 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 */