[PATCH wayland] shm: Add wl_shm_buffer get/put functions

Derek Foreman derekf at osg.samsung.com
Mon Oct 5 08:54:26 PDT 2015


On 04/10/15 01:21 PM, Bill Spitzak wrote:
> On 10/04/2015 08:34 AM, Giulio Camuffo wrote:
>> 2015-07-18 0:30 GMT+03:00 Derek Foreman <derekf at osg.samsung.com>:
>>> Sometimes the compositor wants to make sure a shm pool doesn't disappear
>>> out from under it.
>>>
>>> For example, in Enlightenment, rendering happens in a separate thread
>>> while the main thread can still dispatch events.  If a client is
>>> destroyed
>>> during rendering, all its resources are cleaned up and its shm pools are
>>> unmapped.  This causes the rendering thread to segfault.
> 
> Why is Enlightenment rendering into shared memory owned by the client?

Jasper already said it.

It's a read, not a write.  All the buffer reading happens in a
background thread while the main thread can still dispatch events, which
can result in unmapping the memory it's trying to read from.

> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel



More information about the wayland-devel mailing list