SWDEV-458943 - Add fast path in wait()

wait() is redesigned with two pathes:
fast path: Use spinlock to wait for notify signal. If the
 signal hasn't been received for some loops, go to slow path.
slow path: Use condition_variable's wait().

Improve monitor wrapper for better performance.

Fix some bugs left from name removing patch.

Change-Id: I893a8353121a25d11e37c8e631caf31cc1fc1f24
This commit is contained in:
Tao Sang authored and Tao Sang committed 2025-01-28 12:19:55 -05:00
1 parent d208e8052f
commit f2ff56af9c
4 files changed
+152 -60

No files matched your search

+2 -2
View File
@@ -128,8 +128,8 @@ class CommandQueue : public RuntimeObject {
: properties_(propMask, properties),
rtCUs_(rtCUs),
priority_(priority),
queueLock_("CommandQueue::queueLock"),
lastCmdLock_("LastQueuedCommand"),
queueLock_(),
lastCmdLock_(),
device_(device),
context_(context),
cuMask_(cuMask) {}