[Mesa-dev] [PATCH v2] clover: Reduce wait_count in abort path.
Francisco Jerez
currojerez at riseup.net
Thu Jul 26 17:49:15 UTC 2018
Jan Vesely <jan.vesely at rutgers.edu> writes:
> Trigger waiter condition variable.
> Passes 'events' CTS on carrizo and turks.
> v2: reduce to 0
>
> Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
Reviewed-by: Francisco Jerez <currojerez at riseup.net>
> ---
> src/gallium/state_trackers/clover/core/event.cpp | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/state_trackers/clover/core/event.cpp b/src/gallium/state_trackers/clover/core/event.cpp
> index b7eb33dbfc..3d313ce896 100644
> --- a/src/gallium/state_trackers/clover/core/event.cpp
> +++ b/src/gallium/state_trackers/clover/core/event.cpp
> @@ -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;
> }
>
> --
> 2.17.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180726/d5e325e2/attachment.sig>
More information about the mesa-dev
mailing list