Index: src/backend/storage/buffer/bufmgr.c =================================================================== RCS file: /cvsroot/pgsql-server/src/backend/storage/buffer/bufmgr.c,v retrieving revision 1.153 diff -c -c -r1.153 bufmgr.c *** src/backend/storage/buffer/bufmgr.c 24 Jan 2004 20:00:45 -0000 1.153 --- src/backend/storage/buffer/bufmgr.c 30 Jan 2004 15:55:05 -0000 *************** *** 1058,1067 **** * Nap for the configured time or sleep for 10 seconds if * there was nothing to do at all. */ ! if (n > 0) ! PG_USLEEP(BgWriterDelay * 1000); ! else ! sleep(10); } } --- 1058,1064 ---- * Nap for the configured time or sleep for 10 seconds if * there was nothing to do at all. */ ! PG_USLEEP((n > 0) ? BgWriterDelay * 1000 : 10000000); } } Index: src/include/miscadmin.h =================================================================== RCS file: /cvsroot/pgsql-server/src/include/miscadmin.h,v retrieving revision 1.148 diff -c -c -r1.148 miscadmin.h *** src/include/miscadmin.h 26 Jan 2004 22:59:53 -0000 1.148 --- src/include/miscadmin.h 30 Jan 2004 15:55:06 -0000 *************** *** 109,115 **** #else #define PG_USLEEP(_usec) \ do { \ ! Sleep((_usec) < 500 ? 1 : ((_usec)+500)/ 1000); \ } while(0) #endif --- 109,115 ---- #else #define PG_USLEEP(_usec) \ do { \ ! SleepEx(((_usec) < 500 ? 1 : ((_usec) + 500) / 1000), TRUE); \ } while(0) #endif