Exemple #1
0
void
videoFinish ( videoData *vdata )
{
  dbgprintf ( "video finishing" ) ;

  static s32 i ;
  /* make sure no flip is in progress */
  gcmSetWaitFlip ( vdata->context ) ;

  /* free rsx buffers */
  for ( i = 0 ; i < MAX_BUFFERS ; i++ )
  {
    rsxFree ( vdata->rsx_buffers[i].ptr ) ;
  }

  /* finish rsx context */
  rsxFinish ( vdata->context, 1 ) ;

  /* free host_addr memory */
  free ( vdata->host_addr ) ;

  /* destroy semaphore */
  sysSemDestroy ( vdata->sem ) ;

  /* destroy cond */
  sysCondDestroy ( vdata->cond ) ;

  /* destroy mutex */
  sysMutexDestroy ( vdata->mutex ) ;
}
/* Free the semaphore */
void
SDL_DestroySemaphore(SDL_sem * sem)
{
    if (sem) {
		sysSemDestroy( sem->id);
        SDL_free(sem);
    }
}
pte_osResult pte_osThreadDelete(pte_osThreadHandle handle)
{
    psl1ghtThreadData *pThreadData;
    void *pTls;

    pTls = getTlsStructFromThread(handle);

    pThreadData = getThreadData(handle);

    sysSemDestroy(pThreadData->cancelSem);

    free(pThreadData);

    pteTlsThreadDestroy(pTls);

    return PTE_OS_OK;
}
Exemple #4
0
/* release controller */
inline void
padFinish ( padBtnData *pdata )
{
  dbgprintf ( "pad finishing" ) ;

  /* destroy semaphore */
  sysSemDestroy ( pdata->sem ) ;

  /* destroy cond */
  sysCondDestroy ( pdata->cond ) ;

  /* destroy mutex */
  sysMutexDestroy ( pdata->mutex ) ;

  ioPadEnd () ;

  dbgprintf ( "pad finished" ) ;
}
pte_osResult pte_osSemaphoreDelete(pte_osSemaphoreHandle handle)
{
    sysSemDestroy(handle);

    return PTE_OS_OK;
}