Nikhil Mahale <[email protected]> writes: > ok, here is updated patch.
This patch generated a host of warnings when the type of 'timers' changed to a volatile pointer. Here's an additional patch that gets rid of the warnings; it should be reviewed (and fixed, as needed), then squashed with the original patch.
From f8d1142238a8fe2f274aaeba25484c84f26aaf81 Mon Sep 17 00:00:00 2001 From: Keith Packard <[email protected]> Date: Mon, 29 Dec 2014 14:34:11 -0800 Subject: [PATCH] os: Fix warnings in timer patch --- os/WaitFor.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/os/WaitFor.c b/os/WaitFor.c index 223fbf4..2bf6b27 100644 --- a/os/WaitFor.c +++ b/os/WaitFor.c @@ -121,7 +121,7 @@ struct _OsTimerRec { void *arg; }; -static void DoTimer(OsTimerPtr timer, CARD32 now, OsTimerPtr *prev); +static void DoTimer(OsTimerPtr timer, CARD32 now, volatile OsTimerPtr *prev); static void CheckAllTimers(void); static volatile OsTimerPtr timers = NULL; @@ -407,7 +407,7 @@ CheckAllTimers(void) } static void -DoTimer(OsTimerPtr timer, CARD32 now, OsTimerPtr *prev) +DoTimer(OsTimerPtr timer, CARD32 now, volatile OsTimerPtr *prev) { CARD32 newTime; @@ -423,7 +423,7 @@ OsTimerPtr TimerSet(OsTimerPtr timer, int flags, CARD32 millis, OsTimerCallback func, void *arg) { - register OsTimerPtr *prev; + volatile OsTimerPtr *prev; CARD32 now = GetTimeInMillis(); if (!timer) { @@ -475,7 +475,7 @@ Bool TimerForce(OsTimerPtr timer) { int rc = FALSE; - OsTimerPtr *prev; + volatile OsTimerPtr *prev; OsBlockSignals(); for (prev = &timers; *prev; prev = &(*prev)->next) { @@ -492,7 +492,7 @@ TimerForce(OsTimerPtr timer) void TimerCancel(OsTimerPtr timer) { - OsTimerPtr *prev; + volatile OsTimerPtr *prev; if (!timer) return; -- 2.1.4
-- [email protected]
signature.asc
Description: PGP signature
_______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
