mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-04 08:22:32 +00:00
liverpool: queue::pop takes the front element
This commit is contained in:
parent
d044e378b5
commit
ea78e4d636
@ -93,18 +93,15 @@ void Liverpool::Process(std::stop_token stoken) {
|
|||||||
|
|
||||||
// Process incoming commands with high priority
|
// Process incoming commands with high priority
|
||||||
while (num_commands) {
|
while (num_commands) {
|
||||||
|
|
||||||
Common::UniqueFunction<void> callback{};
|
Common::UniqueFunction<void> callback{};
|
||||||
{
|
{
|
||||||
std::unique_lock lk{submit_mutex};
|
std::unique_lock lk{submit_mutex};
|
||||||
callback = std::move(command_queue.back());
|
callback = std::move(command_queue.front());
|
||||||
command_queue.pop();
|
command_queue.pop();
|
||||||
}
|
|
||||||
|
|
||||||
callback();
|
|
||||||
|
|
||||||
--num_commands;
|
--num_commands;
|
||||||
}
|
}
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
|
||||||
curr_qid = (curr_qid + 1) % num_mapped_queues;
|
curr_qid = (curr_qid + 1) % num_mapped_queues;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user