aboutsummaryrefslogtreecommitdiff
path: root/src/backend/port/win32/timer.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2005-11-22 18:23:31 +0000
committerBruce Momjian <bruce@momjian.us>2005-11-22 18:23:31 +0000
commitbef7764835725e5d8468da1c139e9020be689b95 (patch)
tree71075b16ab6ed5152b31757e5dd65cd2b9383ba0 /src/backend/port/win32/timer.c
parentc8de36352fe72ae2265eb53a6e1bf334e4f24888 (diff)
downloadpostgresql-bef7764835725e5d8468da1c139e9020be689b95.tar.gz
postgresql-bef7764835725e5d8468da1c139e9020be689b95.zip
Re-run pgindent, fixing a problem where comment lines after a blank
comment line where output as too long, and update typedefs for /lib directory. Also fix case where identifiers were used as variable names in the backend, but as typedefs in ecpg (favor the backend for indenting). Backpatch to 8.1.X.
Diffstat (limited to 'src/backend/port/win32/timer.c')
-rw-r--r--src/backend/port/win32/timer.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/backend/port/win32/timer.c b/src/backend/port/win32/timer.c
index b6c0b407e6e..de07a8d97a9 100644
--- a/src/backend/port/win32/timer.c
+++ b/src/backend/port/win32/timer.c
@@ -3,15 +3,15 @@
* timer.c
* Microsoft Windows Win32 Timer Implementation
*
- * Limitations of this implementation:
+ * Limitations of this implementation:
*
- * - Does not support interval timer (value->it_interval)
- * - Only supports ITIMER_REAL
+ * - Does not support interval timer (value->it_interval)
+ * - Only supports ITIMER_REAL
*
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/port/win32/timer.c,v 1.6 2005/10/25 15:15:16 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/port/win32/timer.c,v 1.6.2.1 2005/11/22 18:23:15 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -22,11 +22,12 @@
/* Communication area for inter-thread communication */
-typedef struct timerCA {
+typedef struct timerCA
+{
struct itimerval value;
- HANDLE event;
+ HANDLE event;
CRITICAL_SECTION crit_sec;
-} timerCA;
+} timerCA;
static timerCA timerCommArea;
static HANDLE timerThreadHandle = INVALID_HANDLE_VALUE;
@@ -36,7 +37,7 @@ static HANDLE timerThreadHandle = INVALID_HANDLE_VALUE;
static DWORD WINAPI
pg_timer_thread(LPVOID param)
{
- DWORD waittime;
+ DWORD waittime;
Assert(param == NULL);
@@ -44,7 +45,7 @@ pg_timer_thread(LPVOID param)
for (;;)
{
- int r;
+ int r;
r = WaitForSingleObjectEx(timerCommArea.event, waittime, FALSE);
if (r == WAIT_OBJECT_0)
@@ -53,7 +54,7 @@ pg_timer_thread(LPVOID param)
EnterCriticalSection(&timerCommArea.crit_sec);
if (timerCommArea.value.it_value.tv_sec == 0 &&
timerCommArea.value.it_value.tv_usec == 0)
- waittime = INFINITE; /* Cancel the interrupt */
+ waittime = INFINITE; /* Cancel the interrupt */
else
waittime = timerCommArea.value.it_value.tv_usec / 10 + timerCommArea.value.it_value.tv_sec * 1000;
ResetEvent(timerCommArea.event);