зеркало из https://github.com/github/ruby.git
Move rb_thread_cond_struct definition into thread_native.h
On Win32, currently, rb_nativethread_cond_t is an incomplete type because it's a typedef for `struct rb_thread_cond_struct`. That means you can't actually allocate a rb_nativethread_cond_t unless you also include THREAD_IMPL_H (since its defined in thread_win32.h) (alternatively, including vm_core.h also works). Move the definition of rb_thread_cond_struct into thread_native.h to alleviate this.
This commit is contained in:
Родитель
8c4da473de
Коммит
54a74c4203
|
@ -28,6 +28,11 @@ typedef union rb_thread_lock_union {
|
|||
CRITICAL_SECTION crit;
|
||||
} rb_nativethread_lock_t;
|
||||
|
||||
struct rb_thread_cond_struct {
|
||||
struct cond_event_entry *next;
|
||||
struct cond_event_entry *prev;
|
||||
};
|
||||
|
||||
typedef struct rb_thread_cond_struct rb_nativethread_cond_t;
|
||||
|
||||
#elif defined(HAVE_PTHREAD_H)
|
||||
|
|
|
@ -21,11 +21,6 @@
|
|||
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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче