Move some sync code to miext
As a precursor to the fence sync object video driver and extension API, move some code from Xext to miext/sync. Most of this is just code to set up the build system to include the new directory. No functional code is added in this change. Signed-off-by: James Jones <jajones@nvidia.com> Reviewed-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
12b65de7db
commit
af0f9f9133
2
COPYING
2
COPYING
|
@ -14,7 +14,7 @@ Copyright © 2006-2007 Intel Corporation
|
||||||
Copyright © 2006 Nokia Corporation
|
Copyright © 2006 Nokia Corporation
|
||||||
Copyright © 2006-2008 Peter Hutterer
|
Copyright © 2006-2008 Peter Hutterer
|
||||||
Copyright © 2006 Adam Jackson
|
Copyright © 2006 Adam Jackson
|
||||||
Copyright © 2009 NVIDIA Corporation
|
Copyright © 2009-2010 NVIDIA Corporation
|
||||||
Copyright © 1999 Keith Packard
|
Copyright © 1999 Keith Packard
|
||||||
Copyright © 2007-2009 Red Hat, Inc.
|
Copyright © 2007-2009 Red Hat, Inc.
|
||||||
Copyright © 2005-2008 Daniel Stone
|
Copyright © 2005-2008 Daniel Stone
|
||||||
|
|
|
@ -2192,7 +2192,6 @@ SyncResetProc(ExtensionEntry *extEntry)
|
||||||
RTCounter = 0;
|
RTCounter = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ** Initialise the extension.
|
* ** Initialise the extension.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -51,24 +51,8 @@ PERFORMANCE OF THIS SOFTWARE.
|
||||||
#ifndef _SYNCSRV_H_
|
#ifndef _SYNCSRV_H_
|
||||||
#define _SYNCSRV_H_
|
#define _SYNCSRV_H_
|
||||||
|
|
||||||
#define CARD64 XSyncValue /* XXX temporary! need real 64 bit values for Alpha */
|
#include "misync.h"
|
||||||
|
#include "misyncstr.h"
|
||||||
/* Sync object types */
|
|
||||||
#define SYNC_COUNTER 0
|
|
||||||
|
|
||||||
typedef struct _SyncObject {
|
|
||||||
ClientPtr client; /* Owning client. 0 for system counters */
|
|
||||||
struct _SyncTriggerList *pTriglist; /* list of triggers */
|
|
||||||
XID id; /* resource ID */
|
|
||||||
unsigned char type; /* SYNC_* */
|
|
||||||
Bool beingDestroyed; /* in process of going away */
|
|
||||||
} SyncObject;
|
|
||||||
|
|
||||||
typedef struct _SyncCounter {
|
|
||||||
SyncObject sync; /* Common sync object data */
|
|
||||||
CARD64 value; /* counter value */
|
|
||||||
struct _SysCounterInfo *pSysCounterInfo; /* NULL if not a system counter */
|
|
||||||
} SyncCounter;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The System Counter interface
|
* The System Counter interface
|
||||||
|
@ -100,29 +84,6 @@ typedef struct _SysCounterInfo {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct _SyncTrigger {
|
|
||||||
SyncObject *pSync;
|
|
||||||
CARD64 wait_value; /* wait value */
|
|
||||||
unsigned int value_type; /* Absolute or Relative */
|
|
||||||
unsigned int test_type; /* transition or Comparision type */
|
|
||||||
CARD64 test_value; /* trigger event threshold value */
|
|
||||||
Bool (*CheckTrigger)(
|
|
||||||
struct _SyncTrigger * /*pTrigger*/,
|
|
||||||
CARD64 /*newval*/
|
|
||||||
);
|
|
||||||
void (*TriggerFired)(
|
|
||||||
struct _SyncTrigger * /*pTrigger*/
|
|
||||||
);
|
|
||||||
void (*CounterDestroyed)(
|
|
||||||
struct _SyncTrigger * /*pTrigger*/
|
|
||||||
);
|
|
||||||
} SyncTrigger;
|
|
||||||
|
|
||||||
typedef struct _SyncTriggerList {
|
|
||||||
SyncTrigger *pTrigger;
|
|
||||||
struct _SyncTriggerList *next;
|
|
||||||
} SyncTriggerList;
|
|
||||||
|
|
||||||
typedef struct _SyncAlarmClientList {
|
typedef struct _SyncAlarmClientList {
|
||||||
ClientPtr client;
|
ClientPtr client;
|
||||||
XID delete_id;
|
XID delete_id;
|
||||||
|
@ -179,6 +140,7 @@ extern void SyncChangeCounter(
|
||||||
extern void SyncDestroySystemCounter(
|
extern void SyncDestroySystemCounter(
|
||||||
pointer pCounter
|
pointer pCounter
|
||||||
);
|
);
|
||||||
|
|
||||||
extern void InitServertime(void);
|
extern void InitServertime(void);
|
||||||
|
|
||||||
extern void SyncExtensionInit(void);
|
extern void SyncExtensionInit(void);
|
||||||
|
|
21
configure.ac
21
configure.ac
|
@ -1353,6 +1353,8 @@ FB_LIB='$(top_builddir)/fb/libfb.la'
|
||||||
FB_INC='-I$(top_srcdir)/fb'
|
FB_INC='-I$(top_srcdir)/fb'
|
||||||
MIEXT_SHADOW_INC='-I$(top_srcdir)/miext/shadow'
|
MIEXT_SHADOW_INC='-I$(top_srcdir)/miext/shadow'
|
||||||
MIEXT_SHADOW_LIB='$(top_builddir)/miext/shadow/libshadow.la'
|
MIEXT_SHADOW_LIB='$(top_builddir)/miext/shadow/libshadow.la'
|
||||||
|
MIEXT_SYNC_INC='-I$(top_srcdir)/miext/sync'
|
||||||
|
MIEXT_SYNC_LIB='$(top_builddir)/miext/sync/libsync.la'
|
||||||
CORE_INCS='-I$(top_srcdir)/include -I$(top_builddir)/include'
|
CORE_INCS='-I$(top_srcdir)/include -I$(top_builddir)/include'
|
||||||
|
|
||||||
# SHA1 hashing
|
# SHA1 hashing
|
||||||
|
@ -1492,7 +1494,7 @@ AC_EGREP_CPP([I_AM_SVR4],[
|
||||||
AC_DEFINE([SVR4],1,[Define to 1 on systems derived from System V Release 4])
|
AC_DEFINE([SVR4],1,[Define to 1 on systems derived from System V Release 4])
|
||||||
AC_MSG_RESULT([yes])], AC_MSG_RESULT([no]))
|
AC_MSG_RESULT([yes])], AC_MSG_RESULT([no]))
|
||||||
|
|
||||||
XSERVER_CFLAGS="$XSERVER_CFLAGS $CORE_INCS $XEXT_INC $COMPOSITE_INC $DAMAGE_INC $FIXES_INC $XI_INC $MI_INC $MIEXT_SHADOW_INC $MIEXT_LAYER_INC $MIEXT_DAMAGE_INC $RENDER_INC $RANDR_INC $FB_INC"
|
XSERVER_CFLAGS="$XSERVER_CFLAGS $CORE_INCS $XEXT_INC $COMPOSITE_INC $DAMAGE_INC $FIXES_INC $XI_INC $MI_INC $MIEXT_SYNC_INC $MIEXT_SHADOW_INC $MIEXT_LAYER_INC $MIEXT_DAMAGE_INC $RENDER_INC $RANDR_INC $FB_INC"
|
||||||
|
|
||||||
dnl ---------------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------------
|
||||||
dnl DDX section.
|
dnl DDX section.
|
||||||
|
@ -1505,7 +1507,7 @@ AC_MSG_RESULT([$XVFB])
|
||||||
AM_CONDITIONAL(XVFB, [test "x$XVFB" = xyes])
|
AM_CONDITIONAL(XVFB, [test "x$XVFB" = xyes])
|
||||||
|
|
||||||
if test "x$XVFB" = xyes; then
|
if test "x$XVFB" = xyes; then
|
||||||
XVFB_LIBS="$FB_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB"
|
XVFB_LIBS="$FB_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB"
|
||||||
XVFB_SYS_LIBS="$XVFBMODULES_LIBS $GLX_SYS_LIBS"
|
XVFB_SYS_LIBS="$XVFBMODULES_LIBS $GLX_SYS_LIBS"
|
||||||
AC_SUBST([XVFB_LIBS])
|
AC_SUBST([XVFB_LIBS])
|
||||||
AC_SUBST([XVFB_SYS_LIBS])
|
AC_SUBST([XVFB_SYS_LIBS])
|
||||||
|
@ -1526,7 +1528,7 @@ if test "x$XNEST" = xyes; then
|
||||||
if test "x$have_xnest" = xno; then
|
if test "x$have_xnest" = xno; then
|
||||||
AC_MSG_ERROR([Xnest build explicitly requested, but required modules not found.])
|
AC_MSG_ERROR([Xnest build explicitly requested, but required modules not found.])
|
||||||
fi
|
fi
|
||||||
XNEST_LIBS="$FB_LIB $FIXES_LIB $MI_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DIX_LIB $MAIN_LIB $OS_LIB"
|
XNEST_LIBS="$FB_LIB $FIXES_LIB $MI_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DIX_LIB $MAIN_LIB $OS_LIB"
|
||||||
XNEST_SYS_LIBS="$XNESTMODULES_LIBS $GLX_SYS_LIBS"
|
XNEST_SYS_LIBS="$XNESTMODULES_LIBS $GLX_SYS_LIBS"
|
||||||
AC_SUBST([XNEST_LIBS])
|
AC_SUBST([XNEST_LIBS])
|
||||||
AC_SUBST([XNEST_SYS_LIBS])
|
AC_SUBST([XNEST_SYS_LIBS])
|
||||||
|
@ -1554,7 +1556,7 @@ if test "x$XORG" = xyes; then
|
||||||
XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os'
|
XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os'
|
||||||
XORG_INCS="$XORG_DDXINCS $XORG_OSINCS"
|
XORG_INCS="$XORG_DDXINCS $XORG_OSINCS"
|
||||||
XORG_CFLAGS="$XORGSERVER_CFLAGS -DHAVE_XORG_CONFIG_H"
|
XORG_CFLAGS="$XORGSERVER_CFLAGS -DHAVE_XORG_CONFIG_H"
|
||||||
XORG_LIBS="$COMPOSITE_LIB $FIXES_LIB $XEXTXORG_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB"
|
XORG_LIBS="$COMPOSITE_LIB $FIXES_LIB $XEXTXORG_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB"
|
||||||
|
|
||||||
dnl ==================================================================
|
dnl ==================================================================
|
||||||
dnl symbol visibility
|
dnl symbol visibility
|
||||||
|
@ -1889,7 +1891,7 @@ if test "x$XWIN" = xyes; then
|
||||||
XWIN_SYS_LIBS=-lwinsock2
|
XWIN_SYS_LIBS=-lwinsock2
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
XWIN_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $RANDR_LIB $RENDER_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $OS_LIB"
|
XWIN_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $RANDR_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $OS_LIB"
|
||||||
XWIN_SYS_LIBS="$XWIN_SYS_LIBS $XWINMODULES_LIBS"
|
XWIN_SYS_LIBS="$XWIN_SYS_LIBS $XWINMODULES_LIBS"
|
||||||
AC_SUBST(XWIN_LIBS)
|
AC_SUBST(XWIN_LIBS)
|
||||||
AC_SUBST(XWIN_SERVER_NAME)
|
AC_SUBST(XWIN_SERVER_NAME)
|
||||||
|
@ -1919,7 +1921,7 @@ if test "x$XQUARTZ" = xyes; then
|
||||||
AC_DEFINE(XQUARTZ,1,[Have Quartz])
|
AC_DEFINE(XQUARTZ,1,[Have Quartz])
|
||||||
AC_DEFINE(ROOTLESS,1,[Build Rootless code])
|
AC_DEFINE(ROOTLESS,1,[Build Rootless code])
|
||||||
|
|
||||||
DARWIN_LIBS="$MI_LIB $OS_LIB $DIX_LIB $MAIN_LIB $FB_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB"
|
DARWIN_LIBS="$MI_LIB $OS_LIB $DIX_LIB $MAIN_LIB $FB_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB"
|
||||||
AC_SUBST([DARWIN_LIBS])
|
AC_SUBST([DARWIN_LIBS])
|
||||||
|
|
||||||
AC_CHECK_LIB([Xplugin],[xp_init],[:])
|
AC_CHECK_LIB([Xplugin],[xp_init],[:])
|
||||||
|
@ -1980,7 +1982,7 @@ if test "x$DMX" = xyes; then
|
||||||
fi
|
fi
|
||||||
DMX_INCLUDES="$XEXT_INC $RENDER_INC $RECORD_INC"
|
DMX_INCLUDES="$XEXT_INC $RENDER_INC $RECORD_INC"
|
||||||
XDMX_CFLAGS="$DMXMODULES_CFLAGS"
|
XDMX_CFLAGS="$DMXMODULES_CFLAGS"
|
||||||
XDMX_LIBS="$FB_LIB $MI_LIB $RENDER_LIB $RECORD_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $MIEXT_SHADOW_LIB $MIEXT_DAMAGE_LIB $XEXT_LIB $COMPOSITE_LIB $DAMAGE_LIB $MAIN_LIB $DIX_LIB $CONFIG_LIB $OS_LIB $FIXES_LIB"
|
XDMX_LIBS="$FB_LIB $MI_LIB $XEXT_LIB $RENDER_LIB $RECORD_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $MIEXT_SYNC_LIB $MIEXT_SHADOW_LIB $MIEXT_DAMAGE_LIB $COMPOSITE_LIB $DAMAGE_LIB $MAIN_LIB $DIX_LIB $CONFIG_LIB $OS_LIB $FIXES_LIB"
|
||||||
XDMX_SYS_LIBS="$DMXMODULES_LIBS"
|
XDMX_SYS_LIBS="$DMXMODULES_LIBS"
|
||||||
AC_SUBST([XDMX_CFLAGS])
|
AC_SUBST([XDMX_CFLAGS])
|
||||||
AC_SUBST([XDMX_LIBS])
|
AC_SUBST([XDMX_LIBS])
|
||||||
|
@ -2085,13 +2087,13 @@ if test "$KDRIVE" = yes; then
|
||||||
|
|
||||||
# damage shadow extension glx (NOTYET) fb mi
|
# damage shadow extension glx (NOTYET) fb mi
|
||||||
KDRIVE_INC='-I$(top_srcdir)/hw/kdrive/src'
|
KDRIVE_INC='-I$(top_srcdir)/hw/kdrive/src'
|
||||||
KDRIVE_PURE_INCS="$KDRIVE_INC $MIEXT_DAMAGE_INC $MIEXT_SHADOW_INC $XEXT_INC $FB_INC $MI_INC"
|
KDRIVE_PURE_INCS="$KDRIVE_INC $MIEXT_SYNC_INC $MIEXT_DAMAGE_INC $MIEXT_SHADOW_INC $XEXT_INC $FB_INC $MI_INC"
|
||||||
KDRIVE_OS_INC='-I$(top_srcdir)/hw/kdrive/linux'
|
KDRIVE_OS_INC='-I$(top_srcdir)/hw/kdrive/linux'
|
||||||
KDRIVE_INCS="$KDRIVE_PURE_INCS $KDRIVE_OS_INC"
|
KDRIVE_INCS="$KDRIVE_PURE_INCS $KDRIVE_OS_INC"
|
||||||
|
|
||||||
KDRIVE_CFLAGS="$XSERVER_CFLAGS -DHAVE_KDRIVE_CONFIG_H $TSLIB_CFLAGS"
|
KDRIVE_CFLAGS="$XSERVER_CFLAGS -DHAVE_KDRIVE_CONFIG_H $TSLIB_CFLAGS"
|
||||||
|
|
||||||
KDRIVE_PURE_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $OS_LIB"
|
KDRIVE_PURE_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $OS_LIB"
|
||||||
KDRIVE_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.la'
|
KDRIVE_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.la'
|
||||||
case $host_os in
|
case $host_os in
|
||||||
*linux*)
|
*linux*)
|
||||||
|
@ -2191,6 +2193,7 @@ record/Makefile
|
||||||
config/Makefile
|
config/Makefile
|
||||||
mi/Makefile
|
mi/Makefile
|
||||||
miext/Makefile
|
miext/Makefile
|
||||||
|
miext/sync/Makefile
|
||||||
miext/damage/Makefile
|
miext/damage/Makefile
|
||||||
miext/shadow/Makefile
|
miext/shadow/Makefile
|
||||||
miext/cw/Makefile
|
miext/cw/Makefile
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
SUBDIRS = damage shadow
|
SUBDIRS = sync damage shadow
|
||||||
if COMPOSITE
|
if COMPOSITE
|
||||||
SUBDIRS += cw
|
SUBDIRS += cw
|
||||||
endif
|
endif
|
||||||
|
@ -8,4 +8,4 @@ endif
|
||||||
if XWIN_MULTIWINDOWEXTWM
|
if XWIN_MULTIWINDOWEXTWM
|
||||||
SUBDIRS += rootless
|
SUBDIRS += rootless
|
||||||
endif
|
endif
|
||||||
DIST_SUBDIRS = damage shadow cw rootless
|
DIST_SUBDIRS = sync damage shadow cw rootless
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
noinst_LTLIBRARIES = libsync.la
|
||||||
|
|
||||||
|
AM_CFLAGS = $(DIX_CFLAGS)
|
||||||
|
|
||||||
|
INCLUDES =
|
||||||
|
|
||||||
|
if XORG
|
||||||
|
sdk_HEADERS = misync.h misyncstr.h
|
||||||
|
endif
|
||||||
|
|
||||||
|
libsync_la_SOURCES = \
|
||||||
|
misync.c \
|
||||||
|
misync.h \
|
||||||
|
misyncstr.h
|
|
@ -0,0 +1,25 @@
|
||||||
|
/*
|
||||||
|
* Copyright © 2010 NVIDIA Corporation
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
|
* to deal in the Software without restriction, including without limitation
|
||||||
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
* and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
* Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice (including the next
|
||||||
|
* paragraph) shall be included in all copies or substantial portions of the
|
||||||
|
* Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
* DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "misync.h"
|
||||||
|
#include "misyncstr.h"
|
|
@ -0,0 +1,31 @@
|
||||||
|
/*
|
||||||
|
* Copyright © 2010 NVIDIA Corporation
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
|
* to deal in the Software without restriction, including without limitation
|
||||||
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
* and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
* Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice (including the next
|
||||||
|
* paragraph) shall be included in all copies or substantial portions of the
|
||||||
|
* Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
* DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_DIX_CONFIG_H
|
||||||
|
#include <dix-config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _MISYNC_H_
|
||||||
|
#define _MISYNC_H_
|
||||||
|
|
||||||
|
#endif /* _MISYNC_H_ */
|
|
@ -0,0 +1,77 @@
|
||||||
|
/*
|
||||||
|
* Copyright © 2010 NVIDIA Corporation
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
|
* to deal in the Software without restriction, including without limitation
|
||||||
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
* and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
* Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice (including the next
|
||||||
|
* paragraph) shall be included in all copies or substantial portions of the
|
||||||
|
* Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
* DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_DIX_CONFIG_H
|
||||||
|
#include <dix-config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _MISYNCSTR_H_
|
||||||
|
#define _MISYNCSTR_H_
|
||||||
|
|
||||||
|
#include "dix.h"
|
||||||
|
#include <X11/extensions/syncconst.h>
|
||||||
|
|
||||||
|
#define CARD64 XSyncValue /* XXX temporary! need real 64 bit values for Alpha */
|
||||||
|
|
||||||
|
/* Sync object types */
|
||||||
|
#define SYNC_COUNTER 0
|
||||||
|
|
||||||
|
typedef struct _SyncObject {
|
||||||
|
ClientPtr client; /* Owning client. 0 for system counters */
|
||||||
|
struct _SyncTriggerList *pTriglist; /* list of triggers */
|
||||||
|
XID id; /* resource ID */
|
||||||
|
unsigned char type; /* SYNC_* */
|
||||||
|
Bool beingDestroyed; /* in process of going away */
|
||||||
|
} SyncObject;
|
||||||
|
|
||||||
|
typedef struct _SyncCounter {
|
||||||
|
SyncObject sync; /* Common sync object data */
|
||||||
|
CARD64 value; /* counter value */
|
||||||
|
struct _SysCounterInfo *pSysCounterInfo; /* NULL if not a system counter */
|
||||||
|
} SyncCounter;
|
||||||
|
|
||||||
|
typedef struct _SyncTrigger {
|
||||||
|
SyncObject *pSync;
|
||||||
|
CARD64 wait_value; /* wait value */
|
||||||
|
unsigned int value_type; /* Absolute or Relative */
|
||||||
|
unsigned int test_type; /* transition or Comparision type */
|
||||||
|
CARD64 test_value; /* trigger event threshold value */
|
||||||
|
Bool (*CheckTrigger)(
|
||||||
|
struct _SyncTrigger * /*pTrigger*/,
|
||||||
|
CARD64 /*newval*/
|
||||||
|
);
|
||||||
|
void (*TriggerFired)(
|
||||||
|
struct _SyncTrigger * /*pTrigger*/
|
||||||
|
);
|
||||||
|
void (*CounterDestroyed)(
|
||||||
|
struct _SyncTrigger * /*pTrigger*/
|
||||||
|
);
|
||||||
|
} SyncTrigger;
|
||||||
|
|
||||||
|
typedef struct _SyncTriggerList {
|
||||||
|
SyncTrigger *pTrigger;
|
||||||
|
struct _SyncTriggerList *next;
|
||||||
|
} SyncTriggerList;
|
||||||
|
|
||||||
|
#endif /* _MISYNCSTR_H_ */
|
||||||
|
|
Loading…
Reference in New Issue