mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 09:14:47 +08:00
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:
committed by
Compute-Runtime-Automation
parent
94cf31033c
commit
a7479e6332
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user