static void native_thread_destroy(rb_thread_t *th) { HANDLE intr = InterlockedExchangePointer(&th->native_thread_data.interrupt_event, 0); native_mutex_destroy(&th->interrupt_lock); thread_debug("close handle - intr: %p, thid: %p\n", intr, th->thread_id); w32_close_handle(intr); }
static void gvl_destroy(rb_vm_t *vm) { native_cond_destroy(&vm->gvl.switch_wait_cond); native_cond_destroy(&vm->gvl.switch_cond); native_cond_destroy(&vm->gvl.cond); native_mutex_destroy(&vm->gvl.lock); }
static void native_thread_destroy(rb_thread_t *th) { HANDLE intr = th->native_thread_data.interrupt_event; native_mutex_destroy(&th->interrupt_lock); thread_debug("close handle - intr: %p, thid: %p\n", intr, th->thread_id); th->native_thread_data.interrupt_event = 0; if ( intr ) w32_close_handle(intr); }
static void mutex_free(void *ptr) { if (ptr) { rb_mutex_t *mutex = ptr; if (mutex->th) { /* rb_warn("free locked mutex"); */ const char *err = rb_mutex_unlock_th(mutex, mutex->th); if (err) rb_bug("%s", err); } native_mutex_destroy(&mutex->lock); native_cond_destroy(&mutex->cond); } ruby_xfree(ptr); }
NdbInfo::~NdbInfo(void) { NdbInfoScanVirtual::delete_virtual_tables(m_virtual_tables); native_mutex_destroy(&m_mutex); }
static void gvl_destroy(rb_vm_t *vm) { if (GVL_DEBUG) fprintf(stderr, "gvl destroy\n"); native_mutex_destroy(&vm->gvl.lock); }
int rw_pr_destroy(rw_pr_lock_t *rwlock) { native_cond_destroy(&rwlock->no_active_readers); native_mutex_destroy(&rwlock->lock); return 0; }