attached. -- Dave Cramer 519 939 0336 ICQ # 14675561
Index: backend/storage/lmgr/s_lock.c =================================================================== RCS file: /usr/local/cvs/pgsql-server/src/backend/storage/lmgr/s_lock.c,v retrieving revision 1.16 diff -c -r1.16 s_lock.c *** backend/storage/lmgr/s_lock.c 8 Aug 2003 21:42:00 -0000 1.16 --- backend/storage/lmgr/s_lock.c 21 Apr 2004 20:27:34 -0000 *************** *** 76,82 **** * The select() delays are measured in centiseconds (0.01 sec) because 10 * msec is a common resolution limit at the OS level. */ ! #define SPINS_PER_DELAY 100 #define NUM_DELAYS 1000 #define MIN_DELAY_CSEC 1 #define MAX_DELAY_CSEC 100 --- 76,82 ---- * The select() delays are measured in centiseconds (0.01 sec) because 10 * msec is a common resolution limit at the OS level. */ ! #define SPINS_PER_DELAY 10 #define NUM_DELAYS 1000 #define MIN_DELAY_CSEC 1 #define MAX_DELAY_CSEC 100 *************** *** 88,93 **** --- 88,94 ---- while (TAS(lock)) { + __asm__ __volatile__ ( "rep;nop": : :"memory"); if (++spins > SPINS_PER_DELAY) { if (++delays > NUM_DELAYS) Index: include/storage/s_lock.h =================================================================== RCS file: /usr/local/cvs/pgsql-server/src/include/storage/s_lock.h,v retrieving revision 1.115.2.1 diff -c -r1.115.2.1 s_lock.h *** include/storage/s_lock.h 4 Nov 2003 09:43:56 -0000 1.115.2.1 --- include/storage/s_lock.h 21 Apr 2004 20:26:25 -0000 *************** *** 103,110 **** register slock_t _res = 1; __asm__ __volatile__( ! " lock \n" " xchgb %0,%1 \n" : "=q"(_res), "=m"(*lock) : "0"(_res)); return (int) _res; --- 103,113 ---- register slock_t _res = 1; __asm__ __volatile__( ! " cmpb $0,%1 \n" ! " jne 1f \n" ! " lock \n" " xchgb %0,%1 \n" + " 1:\n" : "=q"(_res), "=m"(*lock) : "0"(_res)); return (int) _res;
---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives?
http://archives.postgresql.org