summaryrefslogtreecommitdiff
path: root/src/port/pthread-win32.h
diff options
context:
space:
mode:
authorMagnus Hagander2008-05-21 14:20:48 +0000
committerMagnus Hagander2008-05-21 14:20:48 +0000
commit206378e4ab02d8ea989c9b26103756b9a8be618a (patch)
tree0e343c35b6b568d4d690e98016684f7c1cfe8c69 /src/port/pthread-win32.h
parent763c4866a2771a4e5c693cbd43fa349980828fab (diff)
Use CRITICAL_SECTION instead of Mutexes for thread-locking in libpq on
Windows, for better performance. Per suggestion from Andrew Chernow, but not his patch since the underlying code was changed to deal with return values.
Diffstat (limited to 'src/port/pthread-win32.h')
-rw-r--r--src/port/pthread-win32.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/port/pthread-win32.h b/src/port/pthread-win32.h
index 1552ae37385..e8e4a559ce4 100644
--- a/src/port/pthread-win32.h
+++ b/src/port/pthread-win32.h
@@ -1,11 +1,11 @@
/*
- * $PostgreSQL: pgsql/src/port/pthread-win32.h,v 1.4 2008/05/17 01:28:25 adunstan Exp $
+ * $PostgreSQL: pgsql/src/port/pthread-win32.h,v 1.5 2008/05/21 14:20:48 mha Exp $
*/
#ifndef __PTHREAD_H
#define __PTHREAD_H
typedef ULONG pthread_key_t;
-typedef HANDLE pthread_mutex_t;
+typedef CRITICAL_SECTION *pthread_mutex_t;
typedef int pthread_once_t;
DWORD pthread_self(void);