tsemaphore.c File Reference

#include <pthread.h>
#include <sys/time.h>
#include <errno.h>
#include "tsemaphore.h"
#include "omx_comp_debug_levels.h"

Go to the source code of this file.

Functions

void tsem_init (tsem_t *tsem, unsigned int val)
void tsem_deinit (tsem_t *tsem)
void tsem_down (tsem_t *tsem)
void tsem_up (tsem_t *tsem)
void tsem_reset (tsem_t *tsem)
void tsem_wait (tsem_t *tsem)
void tsem_signal (tsem_t *tsem)


Detailed Description

Implements a simple inter-thread semaphore so not to have to deal with IPC creation and the like.

Copyright (C) 2007 STMicroelectronics Copyright (C) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

$Date$ Revision $Rev$ Author $Author$

Implements a simple inter-thread semaphore so as not to have to deal with IPC creation and the like.

Copyright (C) 2007 STMicroelectronics Copyright (C) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

$Date$ Revision $Rev$ Author $Author$

Definition in file src/tsemaphore.c.


Function Documentation

void tsem_deinit ( tsem_t tsem  ) 

void tsem_down ( tsem_t tsem  ) 

void tsem_init ( tsem_t tsem,
unsigned int  val 
)

void tsem_reset ( tsem_t tsem  ) 

Reset the value of the semaphore

Parameters:
tsem the semaphore to reset

Definition at line 86 of file src/tsemaphore.c.

Referenced by base_port_DisablePort(), base_port_FlushProcessingBuffers(), omx_filereader_component_Deinit(), omx_parser3gp_component_Deinit(), and omx_videosrc_component_Deinit().

void tsem_signal ( tsem_t tsem  ) 

Signal the condition,if waiting

Parameters:
tsem the semaphore to signal

Definition at line 106 of file src/tsemaphore.c.

Referenced by base_port_FlushProcessingBuffers(), and omx_base_component_DoStateSet().

void tsem_up ( tsem_t tsem  ) 

Increases the value of the semaphore

Parameters:
tsem the semaphore to increase

Definition at line 75 of file src/tsemaphore.c.

Referenced by alsasinkEmptyBufferDone(), alsasinkEventHandler(), audiodecEmptyBufferDone(), audiodecEventHandler(), audiomixerEmptyBufferDone(), audiomixerEventHandler(), audiosinkEmptyBufferDone(), audiosinkEventHandler(), audiosrcEventHandler(), base_port_AllocateBuffer(), base_port_DisablePort(), base_port_EnablePort(), base_port_FlushProcessingBuffers(), base_port_FreeBuffer(), base_port_ReturnBufferFunction(), base_port_SendBufferFunction(), base_port_UseBuffer(), camera_sourceEventHandler(), colorconvEmptyBufferDone(), colorconvEventHandler(), fb_sinkEmptyBufferDone(), fb_sinkEventHandler(), fbsinkEventHandler(), filereaderEventHandler(), omx_audiodec_component_ffmpegLibInit(), omx_base_component_Destructor(), omx_base_component_DoStateSet(), omx_base_component_MessageHandler(), omx_base_component_SendCommand(), omx_filereader_component_Init(), omx_maddec_component_madLibInit(), omx_parser3gp_component_Init(), omx_videodec_component_ffmpegLibInit(), omx_videoenc_component_ffmpegLibInit(), omx_videosrc_component_Init(), parser3gpEventHandler(), symbianoutputstreamEventHandler(), videodecEmptyBufferDone(), videodecEventHandler(), videoencEmptyBufferDone(), videoencEventHandler(), videosrc_port_AllocateBuffer(), videosrc_port_FreeBuffer(), videosrcEventHandler(), volcEmptyBufferDone(), volcEventHandler(), volumeEmptyBufferDone(), volumeEventHandler(), and volumeFillBufferDone().

void tsem_wait ( tsem_t tsem  ) 


Generated for OpenMAX Bellagio rel. 0.3.5-svn by  doxygen 1.5.1
SourceForge.net Logo