فهرست منبع

hle: nvflinger: buffer_queue_core: Cleanup locking.

bunnei 4 سال پیش
والد
کامیت
53058ae73f
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      src/core/hle/service/nvflinger/buffer_queue_core.cpp

+ 2 - 2
src/core/hle/service/nvflinger/buffer_queue_core.cpp

@@ -17,7 +17,7 @@ BufferQueueCore::BufferQueueCore() : lock{mutex, std::defer_lock} {
 }
 
 void BufferQueueCore::NotifyShutdown() {
-    std::unique_lock<std::mutex> lk(mutex);
+    std::unique_lock lk(mutex);
 
     is_shutting_down = true;
 
@@ -124,7 +124,7 @@ bool BufferQueueCore::StillTracking(const BufferItem* item) const {
 
 void BufferQueueCore::WaitWhileAllocatingLocked() const {
     while (is_allocating) {
-        std::unique_lock<std::mutex> lk(mutex);
+        std::unique_lock lk(mutex);
         is_allocating_condition.wait(lk);
     }
 }