SUMO - Simulation of Urban MObility
MFXMutex Class Reference

#include <MFXMutex.h>

Inheritance diagram for MFXMutex:
Inheritance graph
Collaboration diagram for MFXMutex:
Collaboration graph

Public Member Functions

void lock ()
 lock mutex More...
 
FXuint lockCount ()
 return current lock value More...
 
FXbool locked ()
 check if mutex is locked More...
 
 MFXMutex ()
 constructor More...
 
void unlock ()
 release mutex lock More...
 
virtual ~MFXMutex ()
 destructor More...
 

Protected Attributes

FXuint lock_
 lock count More...
 

Private Member Functions

 MFXMutex (const MFXMutex &)=delete
 
MFXMutexoperator= (const MFXMutex &)=delete
 

Private Attributes

FXThreadMutex mutexHandle
 mutex handler More...
 

Detailed Description

Recursive mutual exclusion object. Unlocks on destruction

Definition at line 48 of file MFXMutex.h.

Constructor & Destructor Documentation

◆ MFXMutex() [1/2]

MFXMutex::MFXMutex ( )

constructor

Definition at line 41 of file MFXMutex.cpp.

References mutexHandle.

◆ ~MFXMutex()

MFXMutex::~MFXMutex ( )
virtual

destructor

Definition at line 63 of file MFXMutex.cpp.

References lock_, and mutexHandle.

◆ MFXMutex() [2/2]

MFXMutex::MFXMutex ( const MFXMutex )
privatedelete

Member Function Documentation

◆ lock()

◆ lockCount()

FXuint MFXMutex::lockCount ( )
inline

return current lock value

Definition at line 68 of file MFXMutex.h.

References lock_.

Referenced by SUMORTree::addAdditionalGLObject(), SUMORTree::removeAdditionalGLObject(), and SUMORTree::~SUMORTree().

◆ locked()

◆ operator=()

MFXMutex& MFXMutex::operator= ( const MFXMutex )
privatedelete

◆ unlock()

void MFXMutex::unlock ( )
virtual

release mutex lock

Implements AbstractMutex.

Definition at line 87 of file MFXMutex.cpp.

References lock_, and mutexHandle.

Referenced by MFXEventQue< GUIEvent *>::add(), GUIMainWindow::addChild(), GUITLLogicPhasesTrackerWindow::addValue(), GUIApplicationWindow::closeAllWindows(), GNEApplicationWindow::closeAllWindows(), GUIRunThread::deleteSim(), GUIVehicle::drawBestLanes(), GUISUMOAbstractView::drawDecals(), GUITLLogicPhasesTrackerWindow::drawValues(), MFXEventQue< GUIEvent *>::empty(), GUIParameterTableWindow::GUIParameterTableWindow(), GUIRunThread::init(), GUIDialog_ViewSettings::loadDecals(), GUIDialog_ViewSettings::loadSettings(), GUIRunThread::makeStep(), GUIDialog_ViewSettings::onCmdEditTable(), MFXEventQue< GUIEvent *>::pop(), GUIMEVehicleControl::releaseVehicles(), GUILane::releaseVehicles(), GUIVehicleControl::releaseVehicles(), GUIMainWindow::removeChild(), MFXEventQue< GUIEvent *>::size(), MFXEventQue< GUIEvent *>::top(), GUIEdge::unlock(), GUINet::unlock(), TrackerValueDesc::unlockValues(), GUIMainWindow::updateChildren(), GLObjectValuePassConnector< std::pair< SUMOTime, MSPhaseDefinition > >::~GLObjectValuePassConnector(), GUIBaseVehicle::~GUIBaseVehicle(), GUIEdge::~GUIEdge(), GUILane::~GUILane(), GUIMEVehicleControl::~GUIMEVehicleControl(), GUINet::~GUINet(), GUIParameterTableWindow::~GUIParameterTableWindow(), GUIPerson::~GUIPerson(), GUITLLogicPhasesTrackerWindow::~GUITLLogicPhasesTrackerWindow(), GUIVehicleControl::~GUIVehicleControl(), and TrackerValueDesc::~TrackerValueDesc().

Field Documentation

◆ lock_

FXuint MFXMutex::lock_
protected

lock count

Definition at line 74 of file MFXMutex.h.

Referenced by lock(), lockCount(), locked(), unlock(), and ~MFXMutex().

◆ mutexHandle

FXThreadMutex MFXMutex::mutexHandle
private

mutex handler

Definition at line 78 of file MFXMutex.h.

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


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