On 31 October 2016 at 13:44, Rob Clark robdclark@gmail.com wrote:
From: Rob Clark robclark@freedesktop.org
Rather than cut/pasting these couple ioctl wrappers everywhere, just stuff them as static-inline into a header.
Signed-off-by: Rob Clark robclark@freedesktop.org
This is probably mostly used from mesa, but some drivers, test apps, etc may also want to use it from libdrm.
It makes sense imho. To avoid fun experiences we want the header synced in an identical manner (make headers_install) to the include/drm ones. One might as well move it there, so make its "more" obvious.
+static inline int sync_wait(int fd, int timeout) +{
struct pollfd fds;
fds.fd = fd;
fds.events = POLLIN | POLLERR;
IIRC the API does not mention (forbid even) additional members of the pollfd struct. Let's zero init fds, and the compiler will drop it if/where applicable ?
Thanks Emil