/* Free the semaphore */ void SDL_DestroySemaphore(SDL_sem *sem) { if ( sem ) { RSemaphore sema; sema.SetHandle(sem->handle); sema.Signal(sema.Count()); sema.Close(); delete sem; sem = NULL; } }
bool_t SemaphoreWait(void* Handle,int Tick) { RSemaphore p; p.SetHandle((int)Handle); if (Tick>=0) { #if defined(SYMBIAN90) return p.Wait(Tick*1000) == KErrNone; #else //!!! todo #endif } p.Wait(); return 1; }
/* Free the semaphore */ void SDL_DestroySemaphore(SDL_sem *sem) { if ( sem ) { RSemaphore sema; sema.SetHandle(sem->handle); #if !defined (UIQ3) && !defined(S60V3) sema.Signal(sema.Count()); #else sema.Signal(sem->count); #endif sema.Close(); delete sem; sem = NULL; } }
void SemaphoreRelease(void* Handle,int n) { RSemaphore p; p.SetHandle((int)Handle); p.Signal(n); }
void SemaphoreClose(void* Handle) { RSemaphore p; p.SetHandle((int)Handle); p.Close(); }