From 0df3c4849bd33136bb853eb9f10b567824a740ff Mon Sep 17 00:00:00 2001 From: David Rose Date: Thu, 21 Jun 2007 20:07:59 +0000 Subject: [PATCH] name more mutexes --- panda/src/display/graphicsEngine.cxx | 4 ++-- panda/src/display/graphicsWindow.cxx | 3 ++- panda/src/gobj/geomVertexArrayData.I | 6 ++++-- panda/src/gobj/preparedGraphicsObjects.cxx | 1 + panda/src/pgraph/renderEffects.cxx | 2 +- panda/src/pgraph/renderState.cxx | 2 +- panda/src/pgraph/transformState.cxx | 2 +- panda/src/pstatclient/pStatClient.cxx | 2 +- 8 files changed, 13 insertions(+), 9 deletions(-) diff --git a/panda/src/display/graphicsEngine.cxx b/panda/src/display/graphicsEngine.cxx index 3dde417c4d..a92531067d 100644 --- a/panda/src/display/graphicsEngine.cxx +++ b/panda/src/display/graphicsEngine.cxx @@ -126,7 +126,7 @@ GraphicsEngine:: GraphicsEngine(Pipeline *pipeline) : _pipeline(pipeline), _app("app"), - _lock("GraphicsEngine") + _lock("GraphicsEngine::_lock") { if (_pipeline == (Pipeline *)NULL) { _pipeline = Pipeline::get_render_pipeline(); @@ -1953,7 +1953,7 @@ get_window_renderer(const string &name, int pipeline_stage) { //////////////////////////////////////////////////////////////////// GraphicsEngine::WindowRenderer:: WindowRenderer(const string &name) : - _wl_lock(string("GraphicsEngine::WindowRenderer ") + name) + _wl_lock(string("GraphicsEngine::WindowRenderer::_wl_lock ") + name) { } diff --git a/panda/src/display/graphicsWindow.cxx b/panda/src/display/graphicsWindow.cxx index 3f1006e5cf..b8b04296fd 100644 --- a/panda/src/display/graphicsWindow.cxx +++ b/panda/src/display/graphicsWindow.cxx @@ -44,7 +44,8 @@ GraphicsWindow(GraphicsPipe *pipe, GraphicsStateGuardian *gsg, GraphicsOutput *host) : GraphicsOutput(pipe, name, fb_prop, win_prop, flags, gsg, host), - _input_lock("GraphicsWindow::_input_lock") + _input_lock("GraphicsWindow::_input_lock"), + _properties_lock("GraphicsWindow::_properties_lock") { #ifdef DO_MEMORY_USAGE MemoryUsage::update_type(this, this); diff --git a/panda/src/gobj/geomVertexArrayData.I b/panda/src/gobj/geomVertexArrayData.I index d93252de88..cb8a17c0fd 100644 --- a/panda/src/gobj/geomVertexArrayData.I +++ b/panda/src/gobj/geomVertexArrayData.I @@ -250,7 +250,8 @@ set_lru_size(size_t lru_size) { //////////////////////////////////////////////////////////////////// INLINE GeomVertexArrayData::CData:: CData() : - _usage_hint(UH_unspecified) + _usage_hint(UH_unspecified), + _rw_lock("GeomVertexArrayData::CData::_wl_lock") { } @@ -263,7 +264,8 @@ INLINE GeomVertexArrayData::CData:: CData(const GeomVertexArrayData::CData ©) : _usage_hint(copy._usage_hint), _buffer(copy._buffer), - _modified(copy._modified) + _modified(copy._modified), + _rw_lock("GeomVertexArrayData::CData::_wl_lock") { } diff --git a/panda/src/gobj/preparedGraphicsObjects.cxx b/panda/src/gobj/preparedGraphicsObjects.cxx index 7cd621f1ba..b09a3fc59a 100644 --- a/panda/src/gobj/preparedGraphicsObjects.cxx +++ b/panda/src/gobj/preparedGraphicsObjects.cxx @@ -38,6 +38,7 @@ int PreparedGraphicsObjects::_name_index = 0; //////////////////////////////////////////////////////////////////// PreparedGraphicsObjects:: PreparedGraphicsObjects() : + _lock("PreparedGraphicsObjects::_lock"), _name(init_name()), _texture_residency(_name, "texture"), _vbuffer_residency(_name, "vbuffer"), diff --git a/panda/src/pgraph/renderEffects.cxx b/panda/src/pgraph/renderEffects.cxx index cd28f3fdcc..fef694e4ab 100644 --- a/panda/src/pgraph/renderEffects.cxx +++ b/panda/src/pgraph/renderEffects.cxx @@ -547,7 +547,7 @@ init_states() { // meantime, this is OK because we guarantee that this method is // called at static init time, presumably when there is still only // one thread in the world. - _states_lock = new ReMutex; + _states_lock = new ReMutex("RenderEffects::_states_lock"); nassertv(Thread::get_current_thread() == Thread::get_main_thread()); } diff --git a/panda/src/pgraph/renderState.cxx b/panda/src/pgraph/renderState.cxx index e3a80e05a1..a20f2569ac 100644 --- a/panda/src/pgraph/renderState.cxx +++ b/panda/src/pgraph/renderState.cxx @@ -1867,7 +1867,7 @@ init_states() { // meantime, this is OK because we guarantee that this method is // called at static init time, presumably when there is still only // one thread in the world. - _states_lock = new ReMutex("RenderState"); + _states_lock = new ReMutex("RenderState::_states_lock"); nassertv(Thread::get_current_thread() == Thread::get_main_thread()); } diff --git a/panda/src/pgraph/transformState.cxx b/panda/src/pgraph/transformState.cxx index 7e15fd027a..2211004801 100644 --- a/panda/src/pgraph/transformState.cxx +++ b/panda/src/pgraph/transformState.cxx @@ -1253,7 +1253,7 @@ init_states() { // meantime, this is OK because we guarantee that this method is // called at static init time, presumably when there is still only // one thread in the world. - _states_lock = new ReMutex("TransformState"); + _states_lock = new ReMutex("TransformState::_states_lock"); nassertv(Thread::get_current_thread() == Thread::get_main_thread()); } diff --git a/panda/src/pstatclient/pStatClient.cxx b/panda/src/pstatclient/pStatClient.cxx index 54031f0b15..4171440c59 100644 --- a/panda/src/pstatclient/pStatClient.cxx +++ b/panda/src/pstatclient/pStatClient.cxx @@ -75,7 +75,7 @@ PerThreadData() { //////////////////////////////////////////////////////////////////// PStatClient:: PStatClient() : - _lock("PStatClient"), + _lock("PStatClient::_lock"), _impl(NULL) { _collectors = NULL;