clover: Reduce wait_count in abort path.
Trigger waiter condition variable. Passes 'events' CTS on carrizo and turks. v2: reduce to 0 Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Francisco Jerez <currojerez@riseup.net>
This commit is contained in:
parent
c2942141ae
commit
1e8b8e0878
|
@ -41,7 +41,7 @@ event::trigger_self() {
|
|||
std::lock_guard<std::mutex> lock(mutex);
|
||||
std::vector<intrusive_ref<event>> evs;
|
||||
|
||||
if (!--_wait_count)
|
||||
if (_wait_count && !--_wait_count)
|
||||
std::swap(_chain, evs);
|
||||
|
||||
cv.notify_all();
|
||||
|
@ -65,8 +65,10 @@ event::abort_self(cl_int status) {
|
|||
std::vector<intrusive_ref<event>> evs;
|
||||
|
||||
_status = status;
|
||||
_wait_count = 0;
|
||||
std::swap(_chain, evs);
|
||||
|
||||
cv.notify_all();
|
||||
return evs;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue