a5af1a78c1
Very rarely we can see a deadlock between import_commit and destroy_buffer where: - destroy_buffer is waiting on `wlr_buffer_map_lock` and has `wlserver_lock` (from up the chain) - import_commit has `wlr_buffer_map_lock` and is waiting on `wlserver_lock` To avoid this, we simply replace the lock_guard in import_commit with a unique_lock and manually unlock this before going into the section where we need to lock the wl_server. This is safe for a few reasons: - 1: All accesses to wlr_buffer_map are done before this lock. - 2: destroy_buffer cannot be called from this buffer before now as it only happens because of the signal added below. - 3: "References to elements in the unordered_map container remain valid in all cases, even after a rehash." |
||
---|---|---|
.. | ||
composite.comp | ||
drm.cpp | ||
drm.hpp | ||
gpuvis_trace_utils.h | ||
ime.cpp | ||
ime.hpp | ||
log.cpp | ||
log.hpp | ||
main.cpp | ||
main.hpp | ||
modegen.cpp | ||
modegen.hpp | ||
pipewire.cpp | ||
pipewire.hpp | ||
rendervulkan.cpp | ||
rendervulkan.hpp | ||
sdlscancodetable.hpp | ||
sdlwindow.cpp | ||
sdlwindow.hpp | ||
steamcompmgr.cpp | ||
steamcompmgr.hpp | ||
udev_is_boot_vga.c | ||
vblankmanager.cpp | ||
vblankmanager.hpp | ||
wlserver.cpp | ||
wlserver.hpp |