add libsync.h helper
authorRob Clark <robclark@freedesktop.org>
Mon, 15 Aug 2016 18:45:35 +0000 (14:45 -0400)
committerRob Clark <robclark@freedesktop.org>
Sat, 5 Nov 2016 14:16:46 +0000 (10:16 -0400)
commitf803a45e744272190aaaab1ad7c702641190d002
tree2089fae32e457050f523350db644f1e5fdda2f37
parent6493860d70b4b1bc4b7327dbb8b951643413a0ae
add libsync.h helper

Rather than cut/pasting these couple ioctl wrappers everywhere, just
stuff them as static-inline into a header.

This is probably mostly used from mesa, but some drivers, test apps, etc
may also want to use it from libdrm.

v2: handle EINTR, add sync_accumulate() based on #dri-devel discussion,
    etc

Signed-off-by: Rob Clark <robclark@freedesktop.org>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Makefile.sources
libsync.h [new file with mode: 0644]