diff options
Diffstat (limited to 'thread_win32.h')
-rw-r--r-- | thread_win32.h | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/thread_win32.h b/thread_win32.h index 994949d2b4..23cd71fcfe 100644 --- a/thread_win32.h +++ b/thread_win32.h @@ -21,29 +21,26 @@ WINBASEAPI BOOL WINAPI TryEnterCriticalSection(IN OUT LPCRITICAL_SECTION lpCriticalSection); -struct rb_thread_cond_struct { - struct cond_event_entry *next; - struct cond_event_entry *prev; +struct rb_native_thread { + HANDLE thread_id; + HANDLE interrupt_event; }; -typedef struct native_thread_data_struct { - 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 |