summaryrefslogtreecommitdiff
path: root/thread_win32.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-17 07:21:03 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-17 07:21:03 (GMT)
commitcdeff42cc1838fe71d562c6bd96e2437a3e90170 (patch)
tree38b7ec8772ed4c341d722cd6f7c2ac2e9257a479 /thread_win32.h
parent3c5664563446185c0b7d95de013d47b766122ba8 (diff)
thread_win32.h: rb_thread_lock_t for USE_WIN32_MUTEX
* thread_win32.h (rb_thread_lock_t): make a union for USE_WIN32_MUTEX. this internal is used only in thread_win32.c, but has to be complete to define rb_thread_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_win32.h')
-rw-r--r--thread_win32.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/thread_win32.h b/thread_win32.h
index 4098a42..9c1c467 100644
--- a/thread_win32.h
+++ b/thread_win32.h
@@ -22,7 +22,12 @@ WINBASEAPI BOOL WINAPI
TryEnterCriticalSection(IN OUT LPCRITICAL_SECTION lpCriticalSection);
typedef HANDLE rb_thread_id_t;
-typedef CRITICAL_SECTION rb_thread_lock_t;
+
+typedef union rb_thread_lock_union {
+ HANDLE mutex;
+ CRITICAL_SECTION crit;
+} rb_thread_lock_t;
+
typedef struct rb_thread_cond_struct {
struct cond_event_entry *next;
struct cond_event_entry *prev;