diff -Naur postgresql-8.1.4.orig/src/include/storage/s_lock.h postgresql-8.1.4/src/include/storage/s_lock.h --- postgresql-8.1.4.orig/src/include/storage/s_lock.h 2005-10-11 22:41:32.000000000 +0200 +++ postgresql-8.1.4/src/include/storage/s_lock.h 2006-05-31 09:19:04.000000000 +0200 @@ -125,12 +125,9 @@ * extra test appears to be a small loss on some x86 platforms and a small * win on others; it's by no means clear that we should keep it. */ + /* xchg implies a LOCK prefix, so no need to say LOCK explicitly */ __asm__ __volatile__( - " cmpb $0,%1 \n" - " jne 1f \n" - " lock \n" " xchgb %0,%1 \n" - "1: \n" : "+q"(_res), "+m"(*lock) : : "memory", "cc"); @@ -189,8 +186,8 @@ * is a huge loss. On EM64T, it appears to be a wash or small loss, * so we needn't bother to try to distinguish the sub-architectures. */ + /* xchg implies a LOCK prefix, so no need to say LOCK explicitly */ __asm__ __volatile__( - " lock \n" " xchgb %0,%1 \n" : "+q"(_res), "+m"(*lock) :