Ruby
2.0.0p247(2013-06-27revision41674)
|
00001 /********************************************************************** 00002 00003 thread_win32.h - 00004 00005 $Author: nobu $ 00006 00007 Copyright (C) 2004-2007 Koichi Sasada 00008 00009 **********************************************************************/ 00010 00011 /* interface */ 00012 #ifndef RUBY_THREAD_WIN32_H 00013 #define RUBY_THREAD_WIN32_H 00014 00015 #include <windows.h> 00016 00017 # ifdef __CYGWIN__ 00018 # undef _WIN32 00019 # endif 00020 00021 WINBASEAPI BOOL WINAPI 00022 TryEnterCriticalSection(IN OUT LPCRITICAL_SECTION lpCriticalSection); 00023 00024 typedef HANDLE rb_thread_id_t; 00025 00026 typedef union rb_thread_lock_union { 00027 HANDLE mutex; 00028 CRITICAL_SECTION crit; 00029 } rb_thread_lock_t; 00030 00031 typedef struct rb_thread_cond_struct { 00032 struct cond_event_entry *next; 00033 struct cond_event_entry *prev; 00034 } rb_thread_cond_t; 00035 00036 typedef struct native_thread_data_struct { 00037 HANDLE interrupt_event; 00038 } native_thread_data_t; 00039 00040 typedef struct rb_global_vm_lock_struct { 00041 HANDLE lock; 00042 } rb_global_vm_lock_t; 00043 00044 #endif /* RUBY_THREAD_WIN32_H */ 00045 00046