summaryrefslogtreecommitdiff
path: root/thread_win32.h
diff options
context:
space:
mode:
Diffstat (limited to 'thread_win32.h')
-rw-r--r--thread_win32.h25
1 files changed, 11 insertions, 14 deletions
diff --git a/thread_win32.h b/thread_win32.h
index f0294ee7f6..23cd71fcfe 100644
--- a/thread_win32.h
+++ b/thread_win32.h
@@ -21,29 +21,26 @@
WINBASEAPI BOOL WINAPI
TryEnterCriticalSection(IN OUT LPCRITICAL_SECTION lpCriticalSection);
-typedef struct rb_thread_cond_struct {
- struct cond_event_entry *next;
- struct cond_event_entry *prev;
-} rb_nativethread_cond_t;
-
-typedef struct native_thread_data_struct {
+struct rb_native_thread {
+ HANDLE thread_id;
HANDLE interrupt_event;
-} native_thread_data_t;
+};
+
+struct rb_thread_sched_item {
+ void *vm_stack;
+};
-typedef struct rb_global_vm_lock_struct {
+struct rb_thread_sched {
HANDLE lock;
-} rb_global_vm_lock_t;
+};
typedef DWORD native_tls_key_t; // TLS index
static inline void *
native_tls_get(native_tls_key_t key)
{
- void *ptr = TlsGetValue(key);
- if (UNLIKELY(ptr == NULL)) {
- rb_bug("TlsGetValue() returns NULL");
- }
- return ptr;
+ // return value should be checked by caller.
+ return TlsGetValue(key);
}
static inline void