Skip to content

Commit 1f599a6

Browse files
committed
Stub rb_gvl_event_* on win32
1 parent b867e19 commit 1f599a6

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

include/ruby/thread_native.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,5 @@ typedef struct gvl_hook {
220220

221221
gvl_hook_t * rb_gvl_event_new(void *callback, rb_event_flag_t event);
222222
bool rb_gvl_event_delete(gvl_hook_t * hook);
223-
void rb_gvl_execute_hooks(rb_event_flag_t event, rb_atomic_t waiting);
224223
RBIMPL_SYMBOL_EXPORT_END()
225224
#endif

thread_pthread.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ rb_gvl_event_delete(gvl_hook_t * hook) {
151151
return success;
152152
}
153153

154-
void
154+
static void
155155
rb_gvl_execute_hooks(rb_event_flag_t event, rb_atomic_t waiting) {
156156
if (pthread_rwlock_rdlock(&rb_gvl_hooks_rw_lock)) {
157157
rb_bug("GVL hooks deadlock");

thread_win32.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,16 @@ static volatile DWORD ruby_native_thread_key = TLS_OUT_OF_INDEXES;
3535

3636
static int w32_wait_events(HANDLE *events, int count, DWORD timeout, rb_thread_t *th);
3737

38+
gvl_hook_t *
39+
rb_gvl_event_new(void *callback, rb_event_flag_t event) {
40+
// not implemented yet
41+
}
42+
43+
bool
44+
rb_gvl_event_delete(gvl_hook_t * hook) {
45+
// not implemented yet
46+
}
47+
3848
RBIMPL_ATTR_NORETURN()
3949
static void
4050
w32_error(const char *func)

0 commit comments

Comments
 (0)