xserver/Xext
Alex Goins 7f962c70b6 xsync: Add resource inside of SyncCreate, export SyncCreate
As shown by DRI3 adding the SyncCreateFenceFromFD() function, extensions may
want to create a fence, then initialize it in their own way. This currently
can't be done without adding a function directly to Xext/sync.c due to the fact
that the RTFence resource type is private and there is no external interface to
add to it.

To facilitate other X extensions creating fences and initializing them, this
change exports SyncCreate() and adds the resource directly within it. Callers no
longer need to call AddResource() after SyncCreate(), they only need to
initialize the SyncObject.

To prevent FreeFence() and FreeCounter() from segfaulting if the call to
AddResource() fails before the sync object is initialized, this adds a new
'initialized' parameter to SyncObject that, when FALSE, causes FreeFence() and
FreeCounter() to skip de-initialization and simply free the object.
Initialization after adding the resource shouldn't otherwise be a problem due to
the single-threaded nature of X.

Signed-off-by: Alex Goins <agoins@nvidia.com>
Reviewed-by: James Jones <jajones@nvidia.com>
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
2019-04-17 14:01:17 -07:00
..
Makefile.am
bigreq.c
dpms.c Change the DPMS initialization to be conditional on not set from config 2018-06-26 17:14:34 -07:00
dpmsproc.h
geext.c Use ARRAY_SIZE all over the tree 2017-10-30 13:45:20 -04:00
geext.h
geint.h
hashtable.c Xext: Fix memory leaks in hashtable. 2018-04-10 14:41:29 -04:00
hashtable.h
meson.build meson: Ensure we always build Xext/hashtable.c for glx 2018-04-19 16:20:22 -04:00
panoramiX.c Xext: dynamically allocate the PanoramiXDepths[j].vids array 2018-07-19 11:52:14 +10:00
panoramiX.h
panoramiXSwap.c
panoramiXh.h
panoramiXprocs.c
panoramiXsrv.h
saver.c Xext/saver: Swap ScreenSaverSuspend 'suspend' field. Handle old XCB clients. 2018-03-14 10:14:04 -07:00
security.c
securitysrv.h
shape.c
shm.c shm: Use memfd_create when possible 2019-02-14 12:53:06 +03:00
shmint.h
sleepuntil.c
sleepuntil.h
sync.c xsync: Add resource inside of SyncCreate, export SyncCreate 2019-04-17 14:01:17 -07:00
syncsdk.h xsync: Add resource inside of SyncCreate, export SyncCreate 2019-04-17 14:01:17 -07:00
syncsrv.h
vidmode.c hw/xfree86: unvalidated lengths 2017-10-10 23:33:44 +02:00
xace.c
xace.h
xacestr.h
xcmisc.c
xf86bigfont.c
xf86bigfontsrv.h
xres.c xres: Return the atom naming the type, not its internal type number 2017-11-14 16:02:49 -05:00
xselinux.h
xselinux_ext.c xselinux: warning fix 2018-09-11 20:03:38 +00:00
xselinux_hooks.c
xselinux_label.c
xselinuxint.h
xtest.c
xvdisp.c
xvdisp.h
xvdix.h
xvmain.c
xvmc.c
xvmcext.h