Hey Tom, Tom Stellard <thomas.stell...@amd.com> writes:
> This consolidates signalled checks into the same place. > --- > src/gallium/state_trackers/clover/core/event.cpp | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/gallium/state_trackers/clover/core/event.cpp > b/src/gallium/state_trackers/clover/core/event.cpp > index 58de888..3c9336e 100644 > --- a/src/gallium/state_trackers/clover/core/event.cpp > +++ b/src/gallium/state_trackers/clover/core/event.cpp > @@ -66,7 +66,7 @@ event::signalled() const { > > void > event::chain(event &ev) { > - if (wait_count) { > + if (!signalled()) { The problem with this is that signalled() is part of the public API of this class, so it should implement locking to access the concurrently modified method "wait_count" (you don't seem to have changed that in this series). chain() should also lock, as you do in PATCH 5, so this will lead to a deadlock (unless the mutex is recursive but I doubt this is enough reason to use a recursive mutex). > ev.wait_count++; > _chain.push_back(ev); > } > -- > 2.0.4
signature.asc
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev