summaryrefslogtreecommitdiffstats
path: root/src/port/pthread-win32.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-14 19:16:19 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-14 19:16:19 +0000
commit31176cd686f31dcb71392f6583f7b8d9cef63770 (patch)
tree27fefbaada5177e179c6cf8806be49dfe613d5f4 /src/port/pthread-win32.h
parentAdding upstream version 16.2. (diff)
downloadpostgresql-16-upstream.tar.xz
postgresql-16-upstream.zip
Adding upstream version 16.3.upstream/16.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/port/pthread-win32.h')
-rw-r--r--src/port/pthread-win32.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/port/pthread-win32.h b/src/port/pthread-win32.h
index 97ccc17..5f33269 100644
--- a/src/port/pthread-win32.h
+++ b/src/port/pthread-win32.h
@@ -5,7 +5,16 @@
#define __PTHREAD_H
typedef ULONG pthread_key_t;
-typedef CRITICAL_SECTION *pthread_mutex_t;
+
+typedef struct pthread_mutex_t
+{
+ /* initstate = 0: not initialized; 1: init done; 2: init in progress */
+ LONG initstate;
+ CRITICAL_SECTION csection;
+} pthread_mutex_t;
+
+#define PTHREAD_MUTEX_INITIALIZER { 0 }
+
typedef int pthread_once_t;
DWORD pthread_self(void);