/** \brief Destroy the mutex */ void os_mutexDestroy (os_mutex *mutex) { Error err = Success; assert(mutex != NULL); if ( mutex->localsem != 0 ) { err = CloseSemaphore(mutex->localsem); } else { assert( mutex->uid != 0 ); err = rsRemoveSemaphore(mutex->index); if ( err == Success ) { err = os_mutexMapFindAndRemove(mutex); } } #ifndef NDEBUG if ( err == Success ) { mutex->signature = 0; } #endif if (err != Success) { abort (); } }
void CThreadBase::DoRunThreadL() { CActiveScheduler* scheduler = NULL; scheduler = new (ELeave) CActiveScheduler; CleanupStack::PushL(scheduler); CActiveScheduler::Install(scheduler); OpenSemaphore(); SetUpTestL( ThreadName() ); ThreadL(); TakeDownTest(); CloseSemaphore(); CleanupStack::PopAndDestroy(scheduler); }
CConcurrentDatabaseAccessBase::~CConcurrentDatabaseAccessBase() { iThread.Close(); CloseSemaphore(); delete iDatabaseName; }
CThreadBase::~CThreadBase() { iThread.Close(); CloseSemaphore(); }