[PATCH xserver 3/9] Create SyncObject base type.
Adam Jackson
ajax at nwnk.net
Mon Nov 8 15:12:39 PST 2010
On Tue, 2010-09-21 at 16:32 -0700, James Jones wrote:
> diff --git a/Xext/syncsrv.h b/Xext/syncsrv.h
> index a805f28..cc104ff 100644
> --- a/Xext/syncsrv.h
> +++ b/Xext/syncsrv.h
> @@ -53,15 +53,30 @@ 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
> +#define SYNC_FENCE 1
> +
> +typedef struct _SyncObject {
> ClientPtr client; /* Owning client. 0 for system counters */
> - XSyncCounter id; /* resource ID */
> - CARD64 value; /* counter value */
> + XID id; /* resource ID */
> struct _SyncTriggerList *pTriglist; /* list of triggers */
> - Bool beingDestroyed; /* in process of going away */
> + unsigned char type; /* SYNC_* */
> + Bool beingDestroyed; /* in process of going away */
> +} SyncObject;
20 bytes on ILP32, 32 on LP64, lots of holes. Do this instead?
typedef struct _SyncObject {
ClientPtr client;
struct _SyncTriggerList *pTriglist;
XID id;
unsigned char type;
unsigned char beingDestroyed;
} SyncObject;
14+2 on ILP32, 22+2 on LP64 (+2 for the padding at the end). Not that I
expect to have huge numbers of fences but might as well get it right.
- ajax
More information about the xorg-devel
mailing list