On Fri, Apr 29, 2016 at 5:59 AM, Pekka Paalanen <[email protected]> wrote:
> > > + pthread_mutex_lock(&wrapped_proxy->display->mutex); > > + > > + wrapper->object.interface = wrapped_proxy->object.interface; > > + wrapper->object.id = wrapped_proxy->object.id; > > + wrapper->version = wrapped_proxy->version; > > + wrapper->display = wrapped_proxy->display; > > + wrapper->queue = wrapped_proxy->queue; > > + wrapper->flags = WL_PROXY_FLAG_WRAPPER; > > + wrapper->refcount = 1; > > + > > + pthread_mutex_unlock(&wrapped_proxy->display->mutex); > > + > > + return wrapper; > > +} > > I didn't want to postpone the landing of this any longer, but I still > wonder if we really need that locking at all. > That locking is certainly not necessary. If another thread could change the wrapped_proxy, it could easily change it after the lock is dropped and this function returns, thus making the proxy_wrapper incorrect anyway. So this lock is not preventing any problems.
_______________________________________________ wayland-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/wayland-devel
