summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorSulabh Mahajan <sulabh.mahajan@mongodb.com>2017-04-28 09:01:55 +1000
committerGitHub <noreply@github.com>2017-04-28 09:01:55 +1000
commit52c1dbed31b2832c4b183432478a1caa336b9665 (patch)
treedefeec663f1476e0a568633eec6b5ca855b5f98f /src/include
parent3f02e205906c487376a04cd936888398913161c4 (diff)
downloadmongo-52c1dbed31b2832c4b183432478a1caa336b9665.tar.gz
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
Diffstat (limited to 'src/include')
-rw-r--r--src/include/os_windows.h5
-rw-r--r--src/include/posix.h5
2 files changed, 8 insertions, 2 deletions
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