2024-10-24 16:31:35 +00:00
|
|
|
/*
|
2025-01-28 13:18:46 +00:00
|
|
|
* Copyright (C) 2024-2025 Intel Corporation
|
2024-10-24 16:31:35 +00:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "shared/source/direct_submission/direct_submission_controller.h"
|
|
|
|
|
#include "shared/source/helpers/sleep.h"
|
|
|
|
|
#include "shared/source/os_interface/windows/sys_calls_winmm.h"
|
|
|
|
|
|
|
|
|
|
#include <chrono>
|
2025-06-20 09:23:25 +00:00
|
|
|
|
2024-10-24 16:31:35 +00:00
|
|
|
namespace NEO {
|
|
|
|
|
bool DirectSubmissionController::sleep(std::unique_lock<std::mutex> &lock) {
|
|
|
|
|
SysCalls::timeBeginPeriod(1u);
|
|
|
|
|
bool returnValue = NEO::waitOnConditionWithPredicate(condVar, lock, getSleepValue(), [&] { return !pagingFenceRequests.empty(); });
|
|
|
|
|
SysCalls::timeEndPeriod(1u);
|
|
|
|
|
return returnValue;
|
|
|
|
|
}
|
2025-06-16 16:40:35 +00:00
|
|
|
|
2024-10-24 16:31:35 +00:00
|
|
|
} // namespace NEO
|