tsemaphore.h File Reference

Go to the source code of this file.

Data Structures

struct  tsem_t

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)


Function Documentation

void tsem_deinit ( tsem_t tsem  ) 

Destroy the semaphore

Parameters:
tsem the semaphore to destroy

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

References tsem_t::condition, and tsem_t::mutex.

Referenced by base_port_Destructor(), main(), omx_audiodec_component_Destructor(), omx_base_component_Destructor(), omx_clocksrc_component_Destructor(), omx_filereader_component_Destructor(), omx_maddec_component_Destructor(), omx_parser3gp_component_Destructor(), omx_videodec_component_Destructor(), and omx_videosrc_component_Destructor().

void tsem_down ( tsem_t tsem  ) 

Decreases the value of the semaphore. Blocks if the semaphore value is zero.

Parameters:
tsem the semaphore to decrease

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

References tsem_t::condition, tsem_t::mutex, and tsem_t::semval.

Referenced by audiodecEventHandler(), base_port_DisablePort(), base_port_EnablePort(), base_port_FlushProcessingBuffers(), clocksrc_port_FlushProcessingBuffers(), compMessageHandlerFunction(), main(), omx_alsasink_component_BufferMgmtCallback(), omx_alsasink_component_ClockPortHandleFunction(), omx_audio_mixer_BufferMgmtFunction(), omx_base_component_DoStateSet(), omx_base_filter_BufferMgmtFunction(), omx_base_sink_BufferMgmtFunction(), omx_base_source_BufferMgmtFunction(), omx_base_source_twoport_BufferMgmtFunction(), omx_clocksrc_BufferMgmtFunction(), omx_clocksrc_component_SetConfig(), omx_fbdev_sink_component_BufferMgmtCallback(), omx_fbdev_sink_component_ClockPortHandleFunction(), omx_filereader_component_BufferMgmtCallback(), omx_parser3gp_component_BufferMgmtCallback(), omx_videodec_component_BufferMgmtCallback(), omx_videoenc_component_BufferMgmtCallback(), omx_videosrc_component_BufferMgmtCallback(), and videodecEventHandler().

void tsem_init ( tsem_t tsem,
unsigned int  val 
)

Initializes the semaphore at a given value

Parameters:
tsem the semaphore to initialize
val the initial value of the semaphore
Initializes the semaphore at a given value

Parameters:
tsem the semaphore to initialize
val the initial value of the semaphore

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

References tsem_t::condition, tsem_t::mutex, and tsem_t::semval.

Referenced by base_port_Constructor(), main(), omx_audiodec_component_Constructor(), omx_base_component_Constructor(), omx_clocksrc_component_Constructor(), omx_filereader_component_Constructor(), omx_maddec_component_Constructor(), omx_parser3gp_component_Constructor(), omx_videodec_component_Constructor(), omx_videoenc_component_Constructor(), and omx_videosrc_component_Constructor().

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.

References tsem_t::mutex, and tsem_t::semval.

Referenced by base_port_DisablePort(), base_port_FlushProcessingBuffers(), clocksrc_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.

References tsem_t::condition, and tsem_t::mutex.

Referenced by base_port_FlushProcessingBuffers(), clocksrc_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.

References tsem_t::condition, tsem_t::mutex, and tsem_t::semval.

Referenced by alsasinkEmptyBufferDone(), alsasinkEventHandler(), audiodecEmptyBufferDone(), audiodecEventHandler(), audiomixerEmptyBufferDone(), audiomixerEventHandler(), audiosinkEmptyBufferDone(), audiosinkEventHandler(), audiosrcEventHandler(), base_clock_port_SendBufferFunction(), 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(), clocksrc_port_FlushProcessingBuffers(), clocksrcEventHandler(), colorconvEmptyBufferDone(), colorconvEventHandler(), fb_sinkEmptyBufferDone(), fb_sinkEventHandler(), filereaderEventHandler(), omx_alsasink_component_port_SendBufferFunction(), omx_audiodec_component_ffmpegLibInit(), omx_base_component_Destructor(), omx_base_component_DoStateSet(), omx_base_component_MessageHandler(), omx_base_component_SendCommand(), omx_clocksrc_BufferMgmtFunction(), omx_clocksrc_component_SendCommand(), omx_clocksrc_component_SetConfig(), omx_fbdev_sink_component_port_SendBufferFunction(), 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(), videodecEmptyBufferDone(), videodecEventHandler(), videoencEmptyBufferDone(), videoencEventHandler(), videosrc_port_AllocateBuffer(), videosrc_port_FreeBuffer(), videosrcEventHandler(), volcEmptyBufferDone(), volcEventHandler(), volumeEmptyBufferDone(), volumeEventHandler(), and volumeFillBufferDone().

void tsem_wait ( tsem_t tsem  ) 

Wait on the condition.

Parameters:
tsem the semaphore to wait

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

References tsem_t::condition, and tsem_t::mutex.

Referenced by omx_audio_mixer_BufferMgmtFunction(), omx_base_filter_BufferMgmtFunction(), omx_base_sink_BufferMgmtFunction(), omx_base_source_BufferMgmtFunction(), and omx_base_source_twoport_BufferMgmtFunction().


Generated for OpenMAX Bellagio rel. 0.9.0 by  doxygen 1.5.1
SourceForge.net Logo