drm_hwcomposer: Make main mutex recursive
It allows to remove redundant unlock/lock pair from the code,
and should make it a little bit more race-proof.
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
diff --git a/drm/ResourceManager.h b/drm/ResourceManager.h
index 8e047a3..60b6b16 100644
--- a/drm/ResourceManager.h
+++ b/drm/ResourceManager.h
@@ -69,7 +69,7 @@
std::shared_ptr<UEventListener> uevent_listener_;
- std::mutex main_lock_;
+ std::recursive_mutex main_lock_;
std::map<DrmConnector *, std::unique_ptr<DrmDisplayPipeline>>
attached_pipelines_;