sync: Convert from "CARD64" to int64_t.

The extension was using the name CARD64 to represent 64-bit values,
with a #define from CARD64 to XSyncValue, a struct with a pair of
32-bit values representing a signed 64-bit value.  This interfered
with protocol headers using CARD64 to try to actually store a
uint64_t.  Now that stdint.h exists, let's just use that here,
instead.

v2: Fix alarm delta changes.
v3: Do the potentially overflowing math as uint and convert to int
    afterward, out of C spec paranoia.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Eric Anholt 2017-09-18 17:34:32 -07:00 • committed by Adam Jackson
commit e0f872207a
6 changed files with 190 additions and 182 deletions

View file

@ -45,7 +45,7 @@ struct present_fence {
* SyncTrigger callbacks
*/
static Bool
present_fence_sync_check_trigger(SyncTrigger *trigger, XSyncValue oldval)
present_fence_sync_check_trigger(SyncTrigger *trigger, int64_t oldval)
{
struct present_fence *present_fence = container_of(trigger, struct present_fence, trigger);