diff options
| author | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-01-04 01:36:41 -0500 |
|---|---|---|
| committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-01-04 01:36:41 -0500 |
| commit | 6b354ccaee6988b91a97b1b70b4d84bd4d244cb1 (patch) | |
| tree | 5ea690f449513946d02d4777806e2abc497fe9d1 /src/core/hle/service/nvflinger/buffer_queue.h | |
| parent | 4801f4250d7b3eab0acd22c022a547af5860a6da (diff) | |
buffer_queue: Protect queue_sequence list access with a mutex
fixes a data race as this is an unprotected variable manipulated by multiple threads
Diffstat (limited to 'src/core/hle/service/nvflinger/buffer_queue.h')
| -rw-r--r-- | src/core/hle/service/nvflinger/buffer_queue.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/hle/service/nvflinger/buffer_queue.h b/src/core/hle/service/nvflinger/buffer_queue.h index a2f60d9eb..ad7469277 100644 --- a/src/core/hle/service/nvflinger/buffer_queue.h +++ b/src/core/hle/service/nvflinger/buffer_queue.h @@ -129,8 +129,10 @@ private: std::list<u32> queue_sequence; Kernel::EventPair buffer_wait_event; - std::mutex queue_mutex; - std::condition_variable condition; + std::mutex free_buffers_mutex; + std::condition_variable free_buffers_condition; + + std::mutex queue_sequence_mutex; }; } // namespace Service::NVFlinger |
