From d568221710959cf7d783e6ff0fb80fb43a231124 Mon Sep 17 00:00:00 2001 From: Kaleb Keithley Date: Fri, 14 Nov 2003 16:49:22 +0000 Subject: XFree86 4.3.0.1 --- Xext/sleepuntil.c | 48 ++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 40 insertions(+), 8 deletions(-) (limited to 'Xext/sleepuntil.c') diff --git a/Xext/sleepuntil.c b/Xext/sleepuntil.c index 292924ed6..eb2b96a76 100644 --- a/Xext/sleepuntil.c +++ b/Xext/sleepuntil.c @@ -25,9 +25,11 @@ in this Software without prior written authorization from The Open Group. * * Author: Keith Packard, MIT X Consortium */ +/* $XFree86: xc/programs/Xserver/Xext/sleepuntil.c,v 3.5 2001/12/14 19:58:51 dawes Exp $ */ /* dixsleep.c - implement millisecond timeouts for X clients */ +#include "sleepuntil.h" #include "X.h" #include "Xmd.h" #include "misc.h" @@ -41,7 +43,13 @@ typedef struct _Sertafied { TimeStamp revive; ClientPtr pClient; XID id; - void (*notifyFunc)(); + void (*notifyFunc)( +#if NeedNestedPrototypes + ClientPtr /* client */, + pointer /* closure */ +#endif + ); + pointer closure; } SertafiedRec, *SertafiedPtr; @@ -49,11 +57,35 @@ static SertafiedPtr pPending; static RESTYPE SertafiedResType; static Bool BlockHandlerRegistered; static int SertafiedGeneration; -static void ClientAwaken(); -static int SertafiedDelete(); -static void SertafiedBlockHandler(); -static void SertafiedWakeupHandler(); +static void ClientAwaken( +#if NeedFunctionPrototypes + ClientPtr /* client */, + pointer /* closure */ +#endif +); +static int SertafiedDelete( +#if NeedFunctionPrototypes + pointer /* value */, + XID /* id */ +#endif +); +static void SertafiedBlockHandler( +#if NeedFunctionPrototypes + pointer /* data */, + OSTimePtr /* wt */, + pointer /* LastSelectMask */ +#endif +); +static void SertafiedWakeupHandler( +#if NeedFunctionPrototypes + pointer /* data */, + int /* i */, + pointer /* LastSelectMask */ +#endif +); + +int ClientSleepUntil (client, revive, notifyFunc, closure) ClientPtr client; TimeStamp *revive; @@ -152,7 +184,7 @@ SertafiedBlockHandler (data, wt, LastSelectMask) pointer LastSelectMask; { SertafiedPtr pReq, pNext; - unsigned long newdelay, olddelay; + unsigned long delay; TimeStamp now; if (!pPending) @@ -177,8 +209,8 @@ SertafiedBlockHandler (data, wt, LastSelectMask) pReq = pPending; if (!pReq) return; - newdelay = pReq->revive.milliseconds - now.milliseconds; - AdjustWaitForDelay (wt, newdelay); + delay = pReq->revive.milliseconds - now.milliseconds; + AdjustWaitForDelay (wt, delay); } static void -- cgit v1.2.3