File tree 2 files changed +4
-7
lines changed 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change 8
8
*
9
9
*
10
10
* IDENTIFICATION
11
- * $PostgreSQL: pgsql/src/backend/storage/buffer/bufmgr.c,v 1.153 2004/01/24 20:00:45 wieck Exp $
11
+ * $PostgreSQL: pgsql/src/backend/storage/buffer/bufmgr.c,v 1.154 2004/01/30 15:57:03 momjian Exp $
12
12
*
13
13
*-------------------------------------------------------------------------
14
14
*/
@@ -1058,10 +1058,7 @@ BufferBackgroundWriter(void)
1058
1058
* Nap for the configured time or sleep for 10 seconds if
1059
1059
* there was nothing to do at all.
1060
1060
*/
1061
- if (n > 0 )
1062
- PG_USLEEP (BgWriterDelay * 1000 );
1063
- else
1064
- sleep (10 );
1061
+ PG_USLEEP ((n > 0 ) ? BgWriterDelay * 1000 : 10000000 );
1065
1062
}
1066
1063
}
1067
1064
Original file line number Diff line number Diff line change 12
12
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
13
13
* Portions Copyright (c) 1994, Regents of the University of California
14
14
*
15
- * $PostgreSQL: pgsql/src/include/miscadmin.h,v 1.148 2004/01/26 22:59:53 momjian Exp $
15
+ * $PostgreSQL: pgsql/src/include/miscadmin.h,v 1.149 2004/01/30 15:57:04 momjian Exp $
16
16
*
17
17
* NOTES
18
18
* some of the information in this file should be moved to
@@ -109,7 +109,7 @@ do { \
109
109
#else
110
110
#define PG_USLEEP (_usec ) \
111
111
do { \
112
- Sleep(( _usec) < 500 ? 1 : ((_usec)+ 500)/ 1000); \
112
+ SleepEx((( _usec) < 500 ? 1 : ((_usec) + 500) / 1000), TRUE ); \
113
113
} while(0)
114
114
#endif
115
115
You can’t perform that action at this time.
0 commit comments