void UninitColorMaps (void) { int i; TFB_ColorMap *next; for (i = 0; i < MAX_COLORMAPS; ++i) { TFB_ColorMap *map = colormaps[i]; if (!map) continue; release_colormap (map); colormaps[i] = 0; } // free spares for ( ; poolhead; poolhead = next, --poolcount) { next = poolhead->next; delete_colormap (poolhead); } DestroyMutex (fadeLock); // uninit xform control DestroyMutex (XFormControl.Lock); // uninit colormaps DestroyMutex (maplock); }
void mixSDL_Uninit (void) { int i; UninitStreamDecoder (); for (i = 0; i < NUM_SOUNDSOURCES; ++i) { if (soundSource[i].sample && soundSource[i].sample->decoder) { StopStream (i); } if (soundSource[i].sbuffer) { void *sbuffer = soundSource[i].sbuffer; soundSource[i].sbuffer = NULL; HFree (sbuffer); } DestroyMutex (soundSource[i].stream_mutex); soundSource[i].stream_mutex = 0; mixSDL_DeleteSources (1, &soundSource[i].handle); } SDL_CloseAudio (); mixer_Uninit (); SoundDecoder_Uninit (); SDL_QuitSubSystem (SDL_INIT_AUDIO); }
void TFB_DrawImage_Delete (TFB_Image *image) { if (image == 0) { log_add (log_Warning, "INTERNAL ERROR: Tried to delete a null image!"); /* Should we die here? */ return; } LockMutex (image->mutex); TFB_DrawCanvas_Delete (image->NormalImg); if (image->ScaledImg) { TFB_DrawCanvas_Delete (image->ScaledImg); image->ScaledImg = 0; } if (image->FilledImg) { TFB_DrawCanvas_Delete (image->FilledImg); image->FilledImg = 0; } UnlockMutex (image->mutex); DestroyMutex (image->mutex); HFree (image); }
void openAL_Uninit (void) { int i; UninitStreamDecoder (); for (i = 0; i < NUM_SOUNDSOURCES; ++i) { if (soundSource[i].sample && soundSource[i].sample->decoder) { StopStream (i); } if (soundSource[i].sbuffer) { void *sbuffer = soundSource[i].sbuffer; soundSource[i].sbuffer = NULL; HFree (sbuffer); } DestroyMutex (soundSource[i].stream_mutex); } alcMakeContextCurrent (NULL); alcDestroyContext (alcContext); alcContext = NULL; alcCloseDevice (alcDevice); alcDevice = NULL; SoundDecoder_Uninit (); }
/* Uninitializer of NAT manager. */ static void nmUninitialize(__NAT_MANAGER* pMgr) { __EASY_NAT_ENTRY* pEntry = NULL; BUG_ON(NULL == pMgr); BUG_ON(NULL == pMgr->pTree); BUG_ON(NULL == pMgr->lock); /* Destroy all NAT entries in system. */ WaitForThisObject(pMgr->lock); pEntry = pMgr->entryList.pNext; while (pEntry != &pMgr->entryList) { /* Unlink it first. */ pEntry->pNext->pPrev = pEntry->pPrev; pEntry->pPrev->pNext = pEntry->pNext; _hx_free(pEntry); pEntry = pMgr->entryList.pNext; } ReleaseMutex(pMgr->lock); /* Destroy lock. */ DestroyMutex(pMgr->lock); /* Destroy the radix tree object. */ DestroyRadixTree(pMgr->pTree); return; }
PGPdiskMutex::~PGPdiskMutex() { if (NULL!=(int)(mMutexHandle)) { DestroyMutex(mMutexHandle); mMutexHandle = NULL; } }
void UninitColorMaps (void) { TFB_ColorMap *next; // free spares for ( ; poolhead; poolhead = next) { next = poolhead->next; HFree (poolhead); } // uninit xform control DestroyMutex (XFormControl.Lock); // uninit colormaps DestroyMutex (maplock); }
void CleanupTaskSystem (void) { int i; for (i = 0; i < TASK_MAX; ++i) { DestroyMutex (task_array[i].state_mutex); task_array[i].state_mutex = 0; } }
int log_exit (int code) { showBox = false; if (qlock) { qlock = 0; DestroyMutex (qmutex); } return code; }
BOOLEAN DestroyVideo (VIDEO_REF VideoRef) { TFB_VideoClip* vid = (TFB_VideoClip*) VideoRef; if (!vid) return FALSE; VideoDecoder_Free (vid->decoder); DestroyMutex (vid->guard); HFree (vid); return TRUE; }
void InodeCleanup() { VxdDebugPrint(D_SYSTEM, "InoCleanUp"); EnterMutex(sMutex, BLOCK_THREAD_IDLE); free(sInodeTable); LeaveMutex(sMutex); DestroyMutex(sMutex); VxdDebugPrint(D_SYSTEM, "InoCleanUp: done"); }
void Callback_uninit(void) { // TODO: cleanup the queue? DestroyMutex (callbackListLock); callbackListLock = 0; }
CWMutex::~CWMutex() { DestroyMutex(); }