void random_unref(void) { random_active--; assert(random_active >= 0); if (random_active) return; expire_timer_context(&pool); }
static void serial_free(Backend *be) { Serial *serial = container_of(be, Serial, backend); serial_terminate(serial); expire_timer_context(serial); sfree(serial); }
static void serial_free(void *handle) { Serial serial = (Serial) handle; serial_terminate(serial); expire_timer_context(serial); sfree(serial); }
void random_unref(void) { #ifndef RECONNECTPORT assert(random_active > 0); #endif if (random_active == 1) { random_save_seed(); expire_timer_context(&pool); } random_active--; }
void random_unref(void) { MPEXT_PUTTY_SECTION_ENTER; assert(random_active > 0); if (random_active == 1) { #ifndef MPEXT // We control this on our own in PuttyFinalize() random_save_seed(); #endif expire_timer_context(&pool); } random_active--; MPEXT_PUTTY_SECTION_LEAVE; }
void random_unref(void) { #ifdef MPEXT EnterCriticalSection(&noise_section); #endif random_active--; assert(random_active >= 0); #ifdef MPEXT if (random_active) { LeaveCriticalSection(&noise_section); return; } #else if (random_active) return; #endif expire_timer_context(&pool); #ifdef MPEXT LeaveCriticalSection(&noise_section); #endif }