[PATCH] wayland-util: merge {client, server}_entries in wl_map into one variable

Bill Spitzak spitzak at gmail.com
Mon Sep 9 12:11:05 PDT 2013



Jason Ekstrand wrote:
> Chang,
> This patch is, unfortunately, incorrect.  Yes, we have a side field that 
> tells us which side the wl_map was allocated for.  However, we use one 
> wl_map to store both client-side and server-side IDs.  The side field, 
> together with the WL_SERVER_ID_START, allow us to keep everything 
> straight in the two arrays.  If we replace them by one array, then the 
> client-side and server-side lists will overlap, conflict, and cause 
> massive problems.
> Thanks,
> --Jason Ekstrand

How about not subtracting the WL_SERVER_ID_START when storing in a 
single map? The lookup then adds WL_SERVER_ID_START as needed instead of 
choosing which map to look up in.


More information about the wayland-devel mailing list