Mutex Class Reference

#include <mutex.h>


Public Member Functions

 Mutex (char *title=0, int recursive=0)
 ~Mutex ()
int lock (char *location=0)
int unlock ()
int trylock ()
int reset ()
int is_locked ()

Data Fields

int count
pthread_t thread_id
int thread_id_valid
int recursive
pthread_mutex_t recursive_lock
pthread_mutex_t mutex
char * title


Detailed Description

Definition at line 7 of file mutex.h.


Constructor & Destructor Documentation

Mutex::Mutex ( char *  title = 0,
int  recursive = 0 
)

Definition at line 6 of file mutex.C.

References count, mutex, recursive_lock, thread_id, and thread_id_valid.

Mutex::~Mutex (  ) 

Definition at line 19 of file mutex.C.

References mutex, recursive_lock, and UNSET_ALL_LOCKS.


Member Function Documentation

int Mutex::lock ( char *  location = 0  ) 

Definition at line 28 of file mutex.C.

References count, mutex, recursive, recursive_lock, SET_LOCK, SET_LOCK2, thread_id, thread_id_valid, and title.

Referenced by MainIndexes::add_next_asset(), Preferences::add_node(), Garbage::add_object(), ResourceThread::add_picon(), FileList::add_return_value(), GarbageObject::add_user(), ResourceThread::add_wave(), BRender::allocate_map(), bc_enter_id(), bc_ipc_termination(), bc_remove_id(), BlurEngine::BlurEngine(), BlurZoomThread::BlurZoomThread(), MWindow::brender_available(), CICache::check_in(), CICache::check_out(), FileCR2::check_sig(), Preferences::copy_rates_from(), FileList::create_path(), BC_WindowBase::create_window(), AudioDevice::current_position(), DelayAudioThread::DelayAudioThread(), CICache::delete_entry(), Preferences::delete_node(), Preferences::delete_nodes(), Garbage::delete_object(), CacheBase::delete_oldest(), CICache::delete_oldest(), BC_Synchronous::delete_window_sync(), BCCounter::down(), CICache::dump(), BC_Synchronous::dump_shader(), AVC1394Control::eject(), AVC1394Control::fforward(), FileOGG::flush_ogg(), Preferences::get_avg_rate(), VDeviceBUZInput::get_buffer(), RotateScan::get_cache(), MotionScan::get_cache(), MotionScanUnit::get_cache(), BC_WindowBase::get_event(), BC_WindowBase::get_event_count(), FrameCache::get_frame(), FrameCache::get_frame_ptr(), BC_Resources::get_id(), DeviceDVBInput::get_input_thread(), BRender::get_last_contiguous(), FileThread::get_memory_usage(), CacheBase::get_memory_usage(), CICache::get_memory_usage(), CacheBase::get_oldest(), CICache::get_oldest(), File::get_options(), PackageDispatcher::get_package(), BC_Synchronous::get_shader(), AVC1394Control::get_status(), BC_Synchronous::get_texture(), PlaybackEngine::get_tracking_position(), WaveCache::get_wave(), EditSvgButton::handle_event(), NewSvgButton::handle_event(), SetFormat::handle_event(), RecordMenuItem::handle_event(), PreferencesMenuitem::handle_event(), New::handle_event(), BrowseButton::handle_event(), BatchRenderLoadList::handle_event(), BatchRenderSaveList::handle_event(), BC_Synchronous::handle_garbage(), MWindow::hide_plugin(), MWindow::hide_plugins(), MWindow::init_brender(), BC_NewFolderThread::interrupt(), NewFolderThread::interrupt(), RenderEngine::interrupt_playback(), BRenderThread::is_done(), MainIndexes::load_next_assets(), RenderFarmFSClient::lock(), RenderFarmClientThread::lock(), Canvas::lock_canvas(), BC_DialogThread::lock_window(), EDL::next_id(), OilThread::OilThread(), FileCR2::open_file(), AVC1394Control::pause(), RecordThread::pause_recording(), AVC1394Control::play(), MWindow::plugin_gui_open(), MaskUnit::process_package(), VDeviceBUZInput::put_buffer(), RotateScan::put_cache(), MotionScan::put_cache(), MotionScanUnit::put_cache(), BC_WindowBase::put_event(), FrameCache::put_frame(), DeviceDVBInput::put_input_thread(), BC_Synchronous::put_shader(), BC_Synchronous::put_texture(), WaveCache::put_wave(), BC_Synchronous::quit(), VDeviceBUZ::read_buffer(), AudioDevice::read_buffer(), DVBTune::read_data(), FileThread::read_frame(), FileDV::read_frame(), FileCR2::read_frame(), FileDV::read_samples(), FFT::ready_fftw(), AVC1394Control::record(), BC_Synchronous::release_texture(), CacheBase::remove_all(), CICache::remove_all(), CacheBase::remove_asset(), RemoveThread::remove_file(), GarbageObject::remove_user(), MWindow::render_plugin_gui(), ReverbEngine::ReverbEngine(), AVC1394Control::reverse(), AVC1394Control::rewind(), EditSvgButton::run(), NewSvgButton::run(), ReverbEngine::run(), ColorThread::run(), BlurEngine::run(), BC_Synchronous::run(), BC_NewFolderThread::run(), BC_DialogThread::run(), VDeviceBUZInput::run(), SetFormatThread::run(), ResourceThread::run(), RenderEngine::run(), RemoveThread::run(), RecordThread::run(), RecordAudio::run(), Record::run(), PreferencesThread::run(), PluginDialogThread::run(), NewFolderThread::run(), NewThread::run(), LoadClient::run(), FileThread::run(), FileMOVThread::run(), DVBTuneThread::run(), DC_Offset::run(), CWindowTool::run(), BrowseButton::run(), BRenderThread::run(), BatchRenderLoadList::run(), BatchRenderSaveList::run(), AudioDevice::run_input(), AudioDevice::run_output(), AVC1394Control::seek(), BC_Synchronous::send_command(), BRenderThread::send_command(), BC_Synchronous::send_garbage(), VideoDevice::set_channel(), VDeviceBUZ::set_channel(), VideoDevice::set_picture(), VDeviceBUZ::set_picture(), RenderFarmServerThread::set_progress(), MainPackageRenderer::set_progress(), BRender::set_video_map(), SharpenThread::SharpenThread(), MWindow::show_plugin(), BC_DialogThread::start(), RenderFarmServer::start_clients(), ThreadExec::start_command(), RenderEngine::start_command(), KeepaliveThread::start_keepalive(), BC_NewFolderThread::start_new_folder(), NewFolderThread::start_new_folder(), ColorThread::start_window(), PluginDialogThread::start_window(), FileThread::start_writing(), AVC1394Control::stop(), ResourceThread::stop_draw(), RecordThread::stop_recording(), FileThread::stop_writing(), RecordAudio::sync_position(), SynthThread::SynthThread(), AVC1394Control::timecode(), BCCounter::up(), ColorThread::update_gui(), MWindow::update_plugin_guis(), MWindow::update_plugin_states(), PlaybackEngine::update_tracking(), CWindowTool::update_values(), BlurEngine::wait_process_frame(), ReverbEngine::wait_process_overlays(), WhirlThread::WhirlThread(), VDeviceBUZ::write_buffer(), FileDV::write_frames(), FileOGG::write_frames_theora(), FileDV::write_samples(), FileOGG::write_samples_vorbis(), YUVThread::YUVThread(), BatchRenderLoadList::~BatchRenderLoadList(), BatchRenderSaveList::~BatchRenderSaveList(), BlurZoomMain::~BlurZoomMain(), BRenderThread::~BRenderThread(), BrowseButton::~BrowseButton(), DelayAudio::~DelayAudio(), File::~File(), MWindow::~MWindow(), SharpenMain::~SharpenMain(), and Synth::~Synth().

int Mutex::unlock (  ) 

Definition at line 72 of file mutex.C.

References count, mutex, recursive, recursive_lock, thread_id, thread_id_valid, and UNSET_LOCK.

Referenced by MainIndexes::add_next_asset(), Preferences::add_node(), Garbage::add_object(), ResourceThread::add_picon(), FileList::add_return_value(), GarbageObject::add_user(), ResourceThread::add_wave(), BRender::allocate_map(), bc_enter_id(), bc_ipc_termination(), bc_remove_id(), MWindow::brender_available(), CICache::check_in(), CICache::check_out(), FileCR2::check_sig(), Preferences::copy_rates_from(), FileList::create_path(), BC_WindowBase::create_window(), AudioDevice::current_position(), CICache::delete_entry(), Preferences::delete_node(), Preferences::delete_nodes(), Garbage::delete_object(), CacheBase::delete_oldest(), CICache::delete_oldest(), BC_Synchronous::delete_window_sync(), BCCounter::down(), CICache::dump(), BC_Synchronous::dump_shader(), AVC1394Control::eject(), AVC1394Control::fforward(), FileOGG::flush_ogg(), Preferences::get_avg_rate(), VDeviceBUZInput::get_buffer(), RotateScan::get_cache(), MotionScan::get_cache(), MotionScanUnit::get_cache(), BC_WindowBase::get_event(), BC_WindowBase::get_event_count(), FrameCache::get_frame(), FrameCache::get_frame_ptr(), BC_Resources::get_id(), DeviceDVBInput::get_input_thread(), BRender::get_last_contiguous(), FileThread::get_memory_usage(), CacheBase::get_memory_usage(), CICache::get_memory_usage(), CacheBase::get_oldest(), CICache::get_oldest(), File::get_options(), PackageDispatcher::get_package(), BC_Synchronous::get_shader(), AVC1394Control::get_status(), BC_Synchronous::get_texture(), PlaybackEngine::get_tracking_position(), WaveCache::get_wave(), EditSvgButton::handle_event(), NewSvgButton::handle_event(), SetFormat::handle_event(), RecordMenuItem::handle_event(), PreferencesMenuitem::handle_event(), New::handle_event(), BrowseButton::handle_event(), BatchRenderLoadList::handle_event(), BatchRenderSaveList::handle_event(), BC_Synchronous::handle_garbage(), MWindow::hide_plugin(), MWindow::hide_plugins(), MWindow::init_brender(), BC_NewFolderThread::interrupt(), NewFolderThread::interrupt(), RenderEngine::interrupt_playback(), BRenderThread::is_done(), MainIndexes::load_next_assets(), EDL::next_id(), FileCR2::open_file(), AVC1394Control::pause(), RecordThread::pause_recording(), AVC1394Control::play(), MWindow::plugin_gui_open(), ReverbEngine::process_overlays(), MaskUnit::process_package(), VDeviceBUZInput::put_buffer(), RotateScan::put_cache(), MotionScan::put_cache(), MotionScanUnit::put_cache(), BC_WindowBase::put_event(), FrameCache::put_frame(), DeviceDVBInput::put_input_thread(), BC_Synchronous::put_shader(), BC_Synchronous::put_texture(), WaveCache::put_wave(), BC_Synchronous::quit(), VDeviceBUZ::read_buffer(), AudioDevice::read_buffer(), DVBTune::read_data(), FileThread::read_frame(), FileDV::read_frame(), FileCR2::read_frame(), FileDV::read_samples(), FFT::ready_fftw(), AVC1394Control::record(), BC_Synchronous::release_texture(), CacheBase::remove_all(), CICache::remove_all(), CacheBase::remove_asset(), RemoveThread::remove_file(), GarbageObject::remove_user(), MWindow::render_plugin_gui(), AVC1394Control::reverse(), AVC1394Control::rewind(), YUVThread::run(), WhirlThread::run(), SynthThread::run(), EditSvgButton::run(), NewSvgButton::run(), ReverbEngine::run(), SharpenThread::run(), OilThread::run(), DelayAudioThread::run(), ColorThread::run(), BlurZoomThread::run(), BlurEngine::run(), BC_Synchronous::run(), BC_NewFolderThread::run(), BC_DialogThread::run(), KeepaliveThread::run(), VDeviceBUZInput::run(), ThreadExec::run(), SetFormatThread::run(), ResourceThread::run(), RenderEngine::run(), RemoveThread::run(), RecordThread::run(), RecordAudio::run(), Record::run(), PreferencesThread::run(), PluginDialogThread::run(), NewFolderThread::run(), NewThread::run(), LoadClient::run(), FileThread::run(), FileMOVThread::run(), DVBTuneThread::run(), DC_Offset::run(), CWindowTool::run(), BrowseButton::run(), BRenderThread::run(), BatchRenderLoadList::run(), BatchRenderSaveList::run(), AudioDevice::run_input(), AudioDevice::run_output(), AVC1394Control::seek(), BC_Synchronous::send_command(), BRenderThread::send_command(), BC_Synchronous::send_garbage(), VideoDevice::set_channel(), VDeviceBUZ::set_channel(), VideoDevice::set_picture(), VDeviceBUZ::set_picture(), RenderFarmServerThread::set_progress(), MainPackageRenderer::set_progress(), BRender::set_video_map(), MWindow::show_plugin(), BC_DialogThread::start(), RenderFarmServer::start_clients(), ThreadExec::start_command(), KeepaliveThread::start_keepalive(), BC_NewFolderThread::start_new_folder(), NewFolderThread::start_new_folder(), BlurEngine::start_process_frame(), ColorThread::start_window(), PluginDialogThread::start_window(), FileThread::start_writing(), AVC1394Control::stop(), ResourceThread::stop_draw(), RecordThread::stop_recording(), FileThread::stop_writing(), RecordAudio::sync_position(), AVC1394Control::timecode(), RenderFarmFSClient::unlock(), RenderFarmClientThread::unlock(), CacheBase::unlock(), Canvas::unlock_canvas(), BC_DialogThread::unlock_window(), BCCounter::up(), ColorThread::update_gui(), MWindow::update_plugin_guis(), MWindow::update_plugin_states(), PlaybackEngine::update_tracking(), CWindowTool::update_values(), VDeviceBUZ::write_buffer(), FileDV::write_frames(), FileOGG::write_frames_theora(), FileDV::write_samples(), FileOGG::write_samples_vorbis(), BatchRenderLoadList::~BatchRenderLoadList(), BatchRenderSaveList::~BatchRenderSaveList(), BlurEngine::~BlurEngine(), BRenderThread::~BRenderThread(), BrowseButton::~BrowseButton(), File::~File(), MWindow::~MWindow(), and ReverbEngine::~ReverbEngine().

int Mutex::trylock (  ) 

Definition at line 102 of file mutex.C.

References mutex.

int Mutex::reset (  ) 

Definition at line 112 of file mutex.C.

References count, mutex, thread_id, thread_id_valid, and UNSET_ALL_LOCKS.

Referenced by VideoDevice::initialize().

int Mutex::is_locked (  ) 

Definition at line 107 of file mutex.C.

References count.

Referenced by Canvas::is_locked().


Field Documentation

Definition at line 23 of file mutex.h.

Referenced by is_locked(), lock(), Mutex(), reset(), and unlock().

pthread_t Mutex::thread_id

Definition at line 25 of file mutex.h.

Referenced by lock(), Mutex(), reset(), and unlock().

Definition at line 26 of file mutex.h.

Referenced by lock(), Mutex(), reset(), and unlock().

Definition at line 27 of file mutex.h.

Referenced by lock(), and unlock().

pthread_mutex_t Mutex::recursive_lock

Definition at line 29 of file mutex.h.

Referenced by lock(), Mutex(), unlock(), and ~Mutex().

pthread_mutex_t Mutex::mutex

Definition at line 30 of file mutex.h.

Referenced by lock(), Mutex(), reset(), trylock(), unlock(), and ~Mutex().

char* Mutex::title

Definition at line 31 of file mutex.h.

Referenced by lock().


The documentation for this class was generated from the following files:

Generated on Mon Apr 28 14:32:04 2008 for Cinelerra by  doxygen 1.5.5