summaryrefslogtreecommitdiff
path: root/Xext/syncsrv.h
diff options
context:
space:
mode:
authorJames Jones <jajones@nvidia.com>2010-06-28 14:51:54 -0700
committerJames Jones <jajones@nvidia.com>2010-12-06 19:07:06 -0800
commit99daf419a3070c347c0cd29b4a9bae07eca7bd6d (patch)
tree481137f5493de3372c640ec96c86c75bb8948e42 /Xext/syncsrv.h
parent27593eea7efcbed8de0c6e8233cbd1a1b8a50459 (diff)
Create SyncObject base type.
SyncObject is now the base type for SyncCounter. Data to be used by all sync types is stored in the base object. SyncCounter can be safely cast to SyncObject, and a SyncObject can be cast to the correct type based on SyncObject::type. Signed-off-by: James Jones <jajones@nvidia.com> Reviewed-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'Xext/syncsrv.h')
-rw-r--r--Xext/syncsrv.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/Xext/syncsrv.h b/Xext/syncsrv.h
index 6d0e3d64a..dafbfdf90 100644
--- a/Xext/syncsrv.h
+++ b/Xext/syncsrv.h
@@ -53,12 +53,20 @@ PERFORMANCE OF THIS SOFTWARE.
#define CARD64 XSyncValue /* XXX temporary! need real 64 bit values for Alpha */
-typedef struct _SyncCounter {
+/* Sync object types */
+#define SYNC_COUNTER 0
+
+typedef struct _SyncObject {
ClientPtr client; /* Owning client. 0 for system counters */
- XSyncCounter id; /* resource ID */
- CARD64 value; /* counter value */
struct _SyncTriggerList *pTriglist; /* list of triggers */
- Bool beingDestroyed; /* in process of going away */
+ 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;