static void NTAPI altss_callback(void* UNUSED(handle), DWORD reason, void* UNUSED(reserved)) { ALsizei i; if(reason == DLL_PROCESS_DETACH) { ResetUIntMap(&TlsDestructors); return; } if(reason != DLL_THREAD_DETACH) return; LockUIntMapRead(&TlsDestructors); for(i = 0;i < TlsDestructors.size;i++) { void *ptr = altss_get(TlsDestructors.array[i].key); altss_dtor_t callback = (altss_dtor_t)TlsDestructors.array[i].value; if(ptr && callback) callback(ptr); } UnlockUIntMapRead(&TlsDestructors); }
void DeinitEffectFactoryMap(void) { ResetUIntMap(&EffectStateFactoryMap); }
static void NTAPI althrd_callback(void* UNUSED(handle), DWORD reason, void* UNUSED(reserved)) { if(reason == DLL_PROCESS_DETACH) ResetUIntMap(&ThrdIdHandle); }
void althrd_deinit(void) { ResetUIntMap(&ThrdIdHandle); ResetUIntMap(&TlsDestructors); }