From 52c1dbed31b2832c4b183432478a1caa336b9665 Mon Sep 17 00:00:00 2001 From: Sulabh Mahajan Date: Fri, 28 Apr 2017 09:01:55 +1000 Subject: WT-3302 Introduce a thread struct with a member telling if thread created successfully (#3405) * Introduce a thread stuct with a member denoting if thread got created * Change windows thread create in accordance to new thread struct * Fix build error --- src/include/os_windows.h | 5 ++++- src/include/posix.h | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'src/include') diff --git a/src/include/os_windows.h b/src/include/os_windows.h index 764ade9328c..78a359e65fd 100644 --- a/src/include/os_windows.h +++ b/src/include/os_windows.h @@ -12,7 +12,10 @@ */ typedef CONDITION_VARIABLE wt_cond_t; typedef CRITICAL_SECTION wt_mutex_t; -typedef HANDLE wt_thread_t; +typedef struct { + bool created; + HANDLE id; +} wt_thread_t; /* * Thread callbacks need to match the return signature of _beginthreadex. diff --git a/src/include/posix.h b/src/include/posix.h index aaa88cde4be..23a4d178e98 100644 --- a/src/include/posix.h +++ b/src/include/posix.h @@ -25,7 +25,10 @@ */ typedef pthread_cond_t wt_cond_t; typedef pthread_mutex_t wt_mutex_t; -typedef pthread_t wt_thread_t; +typedef struct { + bool created; + pthread_t id; +} wt_thread_t; /* * Thread callbacks need to match the platform specific callback types -- cgit v1.2.1