summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/include/async.h2
-rw-r--r--src/include/cache.h4
-rw-r--r--src/include/connection.h10
-rw-r--r--src/include/extern.h4
-rw-r--r--src/include/lsm.h2
-rw-r--r--src/include/mutex.h8
-rw-r--r--src/include/os_windows.h11
-rw-r--r--src/include/posix.h11
-rw-r--r--src/os_posix/os_thread.c4
-rw-r--r--src/os_win/os_thread.c4
10 files changed, 27 insertions, 33 deletions
diff --git a/src/include/async.h b/src/include/async.h
index bab2a30eb58..8565874c2f3 100644
--- a/src/include/async.h
+++ b/src/include/async.h
@@ -100,7 +100,7 @@ struct __wt_async {
#define WT_ASYNC_MAX_WORKERS 20
WT_SESSION_IMPL *worker_sessions[WT_ASYNC_MAX_WORKERS];
/* Async worker threads */
- _wt_thread_t worker_tids[WT_ASYNC_MAX_WORKERS];
+ wt_thread_t worker_tids[WT_ASYNC_MAX_WORKERS];
uint32_t flags; /* Currently unused. */
};
diff --git a/src/include/cache.h b/src/include/cache.h
index a0b6d5c1402..b7dbd8401a9 100644
--- a/src/include/cache.h
+++ b/src/include/cache.h
@@ -37,7 +37,7 @@ struct __wt_evict_entry {
struct __wt_evict_worker {
WT_SESSION_IMPL *session;
u_int id;
- _wt_thread_t tid;
+ wt_thread_t tid;
#define WT_EVICT_WORKER_RUN 0x01
uint32_t flags;
};
@@ -104,7 +104,7 @@ struct __wt_cache {
uint32_t cp_skip_count; /* Post change stabilization */
uint64_t cp_reserved; /* Base size for this cache */
WT_SESSION_IMPL *cp_session; /* May be used for cache management */
- _wt_thread_t cp_tid; /* Thread ID for cache pool manager */
+ wt_thread_t cp_tid; /* Thread ID for cache pool manager */
/*
* Flags.
diff --git a/src/include/connection.h b/src/include/connection.h
index 4508c1c4098..81866e39df9 100644
--- a/src/include/connection.h
+++ b/src/include/connection.h
@@ -157,7 +157,7 @@ struct __wt_connection_impl {
int hot_backup;
WT_SESSION_IMPL *ckpt_session; /* Checkpoint thread session */
- _wt_thread_t ckpt_tid; /* Checkpoint thread */
+ wt_thread_t ckpt_tid; /* Checkpoint thread */
int ckpt_tid_set; /* Checkpoint thread set */
WT_CONDVAR *ckpt_cond; /* Checkpoint wait mutex */
const char *ckpt_config; /* Checkpoint configuration */
@@ -208,7 +208,7 @@ struct __wt_connection_impl {
WT_LSM_MANAGER lsm_manager; /* LSM worker thread information */
WT_SESSION_IMPL *evict_session; /* Eviction server sessions */
- _wt_thread_t evict_tid; /* Eviction server thread ID */
+ wt_thread_t evict_tid; /* Eviction server thread ID */
int evict_tid_set; /* Eviction server thread ID set */
uint32_t evict_workers_max;/* Max eviction workers */
@@ -217,7 +217,7 @@ struct __wt_connection_impl {
WT_EVICT_WORKER *evict_workctx; /* Eviction worker context */
WT_SESSION_IMPL *stat_session; /* Statistics log session */
- _wt_thread_t stat_tid; /* Statistics log thread */
+ wt_thread_t stat_tid; /* Statistics log thread */
int stat_tid_set; /* Statistics log thread set */
WT_CONDVAR *stat_cond; /* Statistics log wait mutex */
const char *stat_format; /* Statistics log timestamp format */
@@ -231,7 +231,7 @@ struct __wt_connection_impl {
int archive; /* Global archive configuration */
WT_CONDVAR *arch_cond; /* Log archive wait mutex */
WT_SESSION_IMPL *arch_session; /* Log archive session */
- _wt_thread_t arch_tid; /* Log archive thread */
+ wt_thread_t arch_tid; /* Log archive thread */
int arch_tid_set; /* Log archive thread set */
WT_LOG *log; /* Logging structure */
wt_off_t log_file_max; /* Log file max size */
@@ -239,7 +239,7 @@ struct __wt_connection_impl {
uint32_t txn_logsync; /* Log sync configuration */
WT_SESSION_IMPL *sweep_session; /* Handle sweep session */
- _wt_thread_t sweep_tid; /* Handle sweep thread */
+ wt_thread_t sweep_tid; /* Handle sweep thread */
int sweep_tid_set; /* Handle sweep thread set */
WT_CONDVAR *sweep_cond; /* Handle sweep wait mutex */
diff --git a/src/include/extern.h b/src/include/extern.h
index 36c6e60218b..56029386ad7 100644
--- a/src/include/extern.h
+++ b/src/include/extern.h
@@ -474,8 +474,8 @@ extern int __wt_read( WT_SESSION_IMPL *session, WT_FH *fh, wt_off_t offset, size
extern int __wt_write(WT_SESSION_IMPL *session, WT_FH *fh, wt_off_t offset, size_t len, const void *buf);
extern void __wt_sleep(long seconds, long micro_seconds);
extern uint64_t __wt_strtouq(const char *nptr, char **endptr, int base);
-extern int __wt_thread_create(WT_SESSION_IMPL *session, _wt_thread_t *tidret, void *(*func)(void *), void *arg);
-extern int __wt_thread_join(WT_SESSION_IMPL *session, _wt_thread_t tid);
+extern int __wt_thread_create(WT_SESSION_IMPL *session, wt_thread_t *tidret, void *(*func)(void *), void *arg);
+extern int __wt_thread_join(WT_SESSION_IMPL *session, wt_thread_t tid);
extern void __wt_thread_id(WT_SESSION_IMPL *session, char *buf, size_t buflen);
extern int __wt_seconds(WT_SESSION_IMPL *session, time_t *timep);
extern int __wt_epoch(WT_SESSION_IMPL *session, struct timespec *tsp);
diff --git a/src/include/lsm.h b/src/include/lsm.h
index 0a5d4515aa1..99532b97850 100644
--- a/src/include/lsm.h
+++ b/src/include/lsm.h
@@ -22,7 +22,7 @@ struct __wt_lsm_worker_cookie {
struct __wt_lsm_worker_args {
WT_SESSION_IMPL *session; /* Session */
WT_CONDVAR *work_cond; /* Owned by the manager */
- _wt_thread_t tid; /* Thread id */
+ wt_thread_t tid; /* Thread id */
u_int id; /* My manager slot id */
uint32_t type; /* Types of operations handled */
#define WT_LSM_WORKER_RUN 0x01
diff --git a/src/include/mutex.h b/src/include/mutex.h
index 803aedf4e32..3febf838e1c 100644
--- a/src/include/mutex.h
+++ b/src/include/mutex.h
@@ -14,8 +14,8 @@
struct __wt_condvar {
const char *name; /* Mutex name for debugging */
- _wt_mutex_t mtx; /* Mutex */
- _wt_cond_t cond; /* Condition variable */
+ wt_mutex_t mtx; /* Mutex */
+ wt_cond_t cond; /* Condition variable */
int waiters; /* Numbers of waiters, or
-1 if signalled with no waiters. */
@@ -30,7 +30,7 @@ struct __wt_condvar {
struct __wt_rwlock {
const char *name; /* Lock name for debugging */
- _wt_rwlock_t rwlock; /* Read/write lock */
+ wt_rwlock_t rwlock; /* Read/write lock */
#ifdef _WIN32
uint32_t exclusive_locked;
@@ -61,7 +61,7 @@ typedef volatile int
SPINLOCK_TYPE == SPINLOCK_PTHREAD_MUTEX_LOGGING
typedef struct {
- _wt_mutex_t lock;
+ wt_mutex_t lock;
uint64_t counter; /* Statistics: counter */
diff --git a/src/include/os_windows.h b/src/include/os_windows.h
index 7458a9d2bff..49496eaa602 100644
--- a/src/include/os_windows.h
+++ b/src/include/os_windows.h
@@ -9,13 +9,10 @@
* Define WT threading and concurrency primitives
* Assumes Windows 7+/2008 R2+
*/
-typedef CRITICAL_SECTION _wt_mutex_t;
-
-typedef CONDITION_VARIABLE _wt_cond_t;
-
-typedef SRWLOCK _wt_rwlock_t;
-
-typedef HANDLE _wt_thread_t;
+typedef CONDITION_VARIABLE wt_cond_t;
+typedef CRITICAL_SECTION wt_mutex_t;
+typedef HANDLE wt_thread_t;
+typedef SRWLOCK wt_rwlock_t;
/* Timespec is a POSIX structure not defined in Windows */
struct timespec {
diff --git a/src/include/posix.h b/src/include/posix.h
index 7e139d58fd7..3a85e5f3a6d 100644
--- a/src/include/posix.h
+++ b/src/include/posix.h
@@ -22,10 +22,7 @@
/*
* Define WT threading and concurrency primitives
*/
-typedef pthread_mutex_t _wt_mutex_t;
-
-typedef pthread_cond_t _wt_cond_t;
-
-typedef pthread_rwlock_t _wt_rwlock_t;
-
-typedef pthread_t _wt_thread_t;
+typedef pthread_cond_t wt_cond_t;
+typedef pthread_mutex_t wt_mutex_t;
+typedef pthread_rwlock_t wt_rwlock_t;
+typedef pthread_t wt_thread_t;
diff --git a/src/os_posix/os_thread.c b/src/os_posix/os_thread.c
index 0e257ab5801..ebaeeb8f17a 100644
--- a/src/os_posix/os_thread.c
+++ b/src/os_posix/os_thread.c
@@ -13,7 +13,7 @@
*/
int
__wt_thread_create(WT_SESSION_IMPL *session,
- _wt_thread_t *tidret, void *(*func)(void *), void *arg)
+ wt_thread_t *tidret, void *(*func)(void *), void *arg)
{
WT_DECL_RET;
@@ -28,7 +28,7 @@ __wt_thread_create(WT_SESSION_IMPL *session,
* Wait for a thread of control to exit.
*/
int
-__wt_thread_join(WT_SESSION_IMPL *session, _wt_thread_t tid)
+__wt_thread_join(WT_SESSION_IMPL *session, wt_thread_t tid)
{
WT_DECL_RET;
diff --git a/src/os_win/os_thread.c b/src/os_win/os_thread.c
index fca8ed80f42..b0194e8fc6f 100644
--- a/src/os_win/os_thread.c
+++ b/src/os_win/os_thread.c
@@ -13,7 +13,7 @@
*/
int
__wt_thread_create(WT_SESSION_IMPL *session,
- _wt_thread_t *tidret, void *(*func)(void *), void *arg)
+ wt_thread_t *tidret, void *(*func)(void *), void *arg)
{
/* Spawn a new thread of control. */
*tidret = CreateThread(NULL, 0, func, arg, 0, NULL);
@@ -28,7 +28,7 @@ __wt_thread_create(WT_SESSION_IMPL *session,
* Wait for a thread of control to exit.
*/
int
-__wt_thread_join(WT_SESSION_IMPL *session, _wt_thread_t tid)
+__wt_thread_join(WT_SESSION_IMPL *session, wt_thread_t tid)
{
WT_DECL_RET;