fix: ulls controller state and tests

Make the fields in direct submission state atomic.
Add thread yields to waiting loop in tests to avoid compiler optimizing
them away.

Related-To: NEO-10942

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
Dominik Dabek
2024-03-28 13:15:59 +00:00
committed by Compute-Runtime-Automation
parent 94cf31033c
commit a7479e6332
3 changed files with 12 additions and 3 deletions

View File

@@ -50,8 +50,13 @@ class DirectSubmissionController {
protected:
struct DirectSubmissionState {
bool isStopped = true;
TaskCountType taskCount = 0u;
std::atomic_bool isStopped{true};
std::atomic<TaskCountType> taskCount{0};
DirectSubmissionState(DirectSubmissionState &&other) {
isStopped = other.isStopped.load();
taskCount = other.taskCount.load();
}
DirectSubmissionState() = default;
};
static void *controlDirectSubmissionsState(void *self);