summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2015-09-01 18:51:14 -0700
committerAdam Jackson <ajax@redhat.com>2016-07-18 15:27:51 -0400
commit9d15912aa475b733bbb20efc367a67dacad63bf1 (patch)
treebdbad787bf5be280df99636b37350158da233a8e
parentfb0802113b4c57819cba15d64baf79bf4148607e (diff)
Remove fd_set from Block/Wakeup handler API
This removes the last uses of fd_set from the server interfaces outside of the OS layer itself. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
-rw-r--r--Xext/sleepuntil.c17
-rw-r--r--Xext/sync.c12
-rw-r--r--dix/dixfonts.c7
-rw-r--r--dix/dixutils.c20
-rw-r--r--hw/dmx/dmxsync.c4
-rw-r--r--hw/dmx/input/dmxinputinit.c4
-rw-r--r--hw/vfb/InitOutput.c4
-rw-r--r--hw/xfree86/common/xf86Events.c2
-rw-r--r--hw/xfree86/common/xf86Init.c2
-rw-r--r--hw/xfree86/common/xf86Priv.h2
-rw-r--r--hw/xfree86/dri/dri.c4
-rw-r--r--hw/xfree86/dri/dri.h6
-rw-r--r--hw/xnest/Handlers.c4
-rw-r--r--hw/xnest/Handlers.h5
-rw-r--r--hw/xwayland/xwayland.c4
-rw-r--r--include/dix.h26
-rw-r--r--miext/rootless/rootlessScreen.c4
-rw-r--r--os/WaitFor.c4
18 files changed, 62 insertions, 69 deletions
diff --git a/Xext/sleepuntil.c b/Xext/sleepuntil.c
index 993c028b8..68a7a9bee 100644
--- a/Xext/sleepuntil.c
+++ b/Xext/sleepuntil.c
@@ -63,14 +63,11 @@ static void ClientAwaken(ClientPtr /* client */ ,
static int SertafiedDelete(void * /* value */ ,
XID /* id */
);
-static void SertafiedBlockHandler(void * /* data */ ,
- OSTimePtr /* wt */ ,
- void * /* LastSelectMask */
- );
-static void SertafiedWakeupHandler(void * /* data */ ,
- int /* i */ ,
- void * /* LastSelectMask */
- );
+static void SertafiedBlockHandler(void *data,
+ void *timeout);
+
+static void SertafiedWakeupHandler(void *data,
+ int i);
int
ClientSleepUntil(ClientPtr client,
@@ -154,7 +151,7 @@ SertafiedDelete(void *value, XID id)
}
static void
-SertafiedBlockHandler(void *data, OSTimePtr wt, void *LastSelectMask)
+SertafiedBlockHandler(void *data, void *wt)
{
SertafiedPtr pReq, pNext;
unsigned long delay;
@@ -186,7 +183,7 @@ SertafiedBlockHandler(void *data, OSTimePtr wt, void *LastSelectMask)
}
static void
-SertafiedWakeupHandler(void *data, int i, void *LastSelectMask)
+SertafiedWakeupHandler(void *data, int i)
{
SertafiedPtr pReq, pNext;
TimeStamp now;
diff --git a/Xext/sync.c b/Xext/sync.c
index 4c59fea08..323b9dbe1 100644
--- a/Xext/sync.c
+++ b/Xext/sync.c
@@ -2556,8 +2556,8 @@ static XSyncValue *pnext_time;
*** Server Block Handler
*** code inspired by multibuffer extension (now deprecated)
*/
- /*ARGSUSED*/ static void
-ServertimeBlockHandler(void *env, struct timeval **wt, void *LastSelectMask)
+/*ARGSUSED*/ static void
+ServertimeBlockHandler(void *env, void *wt)
{
XSyncValue delay;
unsigned long timeout;
@@ -2582,8 +2582,8 @@ ServertimeBlockHandler(void *env, struct timeval **wt, void *LastSelectMask)
/*
*** Wakeup Handler
*/
- /*ARGSUSED*/ static void
-ServertimeWakeupHandler(void *env, int rc, void *LastSelectMask)
+/*ARGSUSED*/ static void
+ServertimeWakeupHandler(void *env, int rc)
{
if (pnext_time) {
GetTime();
@@ -2658,7 +2658,7 @@ IdleTimeQueryValue(void *pCounter, CARD64 * pValue_return)
}
static void
-IdleTimeBlockHandler(void *pCounter, struct timeval **wt, void *LastSelectMask)
+IdleTimeBlockHandler(void *pCounter, void *wt)
{
SyncCounter *counter = pCounter;
IdleCounterPriv *priv = SysCounterGetPrivate(counter);
@@ -2751,7 +2751,7 @@ IdleTimeCheckBrackets(SyncCounter *counter, XSyncValue idle, XSyncValue *less, X
}
static void
-IdleTimeWakeupHandler(void *pCounter, int rc, void *LastSelectMask)
+IdleTimeWakeupHandler(void *pCounter, int rc)
{
SyncCounter *counter = pCounter;
IdleCounterPriv *priv = SysCounterGetPrivate(counter);
diff --git a/dix/dixfonts.c b/dix/dixfonts.c
index d217d1228..cca92ed27 100644
--- a/dix/dixfonts.c
+++ b/dix/dixfonts.c
@@ -197,7 +197,7 @@ RemoveFontWakeup(FontPathElementPtr fpe)
}
static void
-FontWakeup(void *data, int count, void *LastSelectMask)
+FontWakeup(void *data, int count)
{
int i;
FontPathElementPtr fpe;
@@ -1918,8 +1918,7 @@ _client_auth_generation(ClientPtr client)
static int fs_handlers_installed = 0;
static unsigned int last_server_gen;
-static void
-fs_block_handler(void *blockData, OSTimePtr timeout, void *readmask)
+static void fs_block_handler(void *blockData, void *timeout)
{
FontBlockHandlerProcPtr block_handler = blockData;
@@ -2004,7 +2003,7 @@ _init_fs_handlers(FontPathElementPtr fpe, FontBlockHandlerProcPtr block_handler)
static void
_remove_fs_handlers(FontPathElementPtr fpe, FontBlockHandlerProcPtr block_handler,
- Bool all)
+ Bool all)
{
if (all) {
/* remove the handlers if no one else is using them */
diff --git a/dix/dixutils.c b/dix/dixutils.c
index d72892943..540023cbd 100644
--- a/dix/dixutils.c
+++ b/dix/dixutils.c
@@ -360,8 +360,8 @@ NoopDDA(void)
}
typedef struct _BlockHandler {
- BlockHandlerProcPtr BlockHandler;
- WakeupHandlerProcPtr WakeupHandler;
+ ServerBlockHandlerProcPtr BlockHandler;
+ ServerWakeupHandlerProcPtr WakeupHandler;
void *blockData;
Bool deleted;
} BlockHandlerRec, *BlockHandlerPtr;
@@ -378,14 +378,14 @@ static Bool handlerDeleted;
* \param pReadMask nor how it represents the det of descriptors
*/
void
-BlockHandler(void *pTimeout, void *pReadmask)
+BlockHandler(void *pTimeout)
{
int i, j;
++inHandler;
for (i = 0; i < numHandlers; i++)
if (!handlers[i].deleted)
- (*handlers[i].BlockHandler) (handlers[i].blockData, pTimeout, pReadmask);
+ (*handlers[i].BlockHandler) (handlers[i].blockData, pTimeout);
for (i = 0; i < screenInfo.numGPUScreens; i++)
(*screenInfo.gpuscreens[i]->BlockHandler) (screenInfo.gpuscreens[i], pTimeout);
@@ -413,7 +413,7 @@ BlockHandler(void *pTimeout, void *pReadmask)
* \param pReadmask the resulting descriptor mask
*/
void
-WakeupHandler(int result, void *pReadmask)
+WakeupHandler(int result)
{
int i, j;
@@ -424,7 +424,7 @@ WakeupHandler(int result, void *pReadmask)
(*screenInfo.gpuscreens[i]->WakeupHandler) (screenInfo.gpuscreens[i], result);
for (i = numHandlers - 1; i >= 0; i--)
if (!handlers[i].deleted)
- (*handlers[i].WakeupHandler) (handlers[i].blockData, result, pReadmask);
+ (*handlers[i].WakeupHandler) (handlers[i].blockData, result);
if (handlerDeleted) {
for (i = 0; i < numHandlers;)
if (handlers[i].deleted) {
@@ -444,8 +444,8 @@ WakeupHandler(int result, void *pReadmask)
* get called until next time
*/
Bool
-RegisterBlockAndWakeupHandlers(BlockHandlerProcPtr blockHandler,
- WakeupHandlerProcPtr wakeupHandler,
+RegisterBlockAndWakeupHandlers(ServerBlockHandlerProcPtr blockHandler,
+ ServerWakeupHandlerProcPtr wakeupHandler,
void *blockData)
{
BlockHandlerPtr new;
@@ -467,8 +467,8 @@ RegisterBlockAndWakeupHandlers(BlockHandlerProcPtr blockHandler,
}
void
-RemoveBlockAndWakeupHandlers(BlockHandlerProcPtr blockHandler,
- WakeupHandlerProcPtr wakeupHandler,
+RemoveBlockAndWakeupHandlers(ServerBlockHandlerProcPtr blockHandler,
+ ServerWakeupHandlerProcPtr wakeupHandler,
void *blockData)
{
int i;
diff --git a/hw/dmx/dmxsync.c b/hw/dmx/dmxsync.c
index 81dbbc64d..1bc242343 100644
--- a/hw/dmx/dmxsync.c
+++ b/hw/dmx/dmxsync.c
@@ -99,13 +99,13 @@ dmxSyncCallback(OsTimerPtr timer, CARD32 time, void *arg)
}
static void
-dmxSyncBlockHandler(void *blockData, OSTimePtr pTimeout, void *pReadMask)
+dmxSyncBlockHandler(void *blockData, void *timeout)
{
TimerForce(dmxSyncTimer);
}
static void
-dmxSyncWakeupHandler(void *blockData, int result, void *pReadMask)
+dmxSyncWakeupHandler(void *blockData, int result)
{
}
diff --git a/hw/dmx/input/dmxinputinit.c b/hw/dmx/input/dmxinputinit.c
index a9522ff08..554d234e9 100644
--- a/hw/dmx/input/dmxinputinit.c
+++ b/hw/dmx/input/dmxinputinit.c
@@ -630,7 +630,7 @@ dmxCollectAll(DMXInputInfo * dmxInput)
}
static void
-dmxBlockHandler(void *blockData, OSTimePtr pTimeout, void *pReadMask)
+dmxBlockHandler(void *blockData, void *timeout)
{
DMXInputInfo *dmxInput = &dmxInputs[(uintptr_t) blockData];
static unsigned long generation = 0;
@@ -658,7 +658,7 @@ dmxSwitchReturn(void *p)
}
static void
-dmxWakeupHandler(void *blockData, int result, void *pReadMask)
+dmxWakeupHandler(void *blockData, int result)
{
DMXInputInfo *dmxInput = &dmxInputs[(uintptr_t) blockData];
int i;
diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c
index 01bb63128..d7bfd70e9 100644
--- a/hw/vfb/InitOutput.c
+++ b/hw/vfb/InitOutput.c
@@ -471,7 +471,7 @@ vfbSaveScreen(ScreenPtr pScreen, int on)
/* this flushes any changes to the screens out to the mmapped file */
static void
-vfbBlockHandler(void *blockData, OSTimePtr pTimeout, void *pReadmask)
+vfbBlockHandler(void *blockData, void *timeout)
{
int i;
@@ -492,7 +492,7 @@ vfbBlockHandler(void *blockData, OSTimePtr pTimeout, void *pReadmask)
}
static void
-vfbWakeupHandler(void *blockData, int result, void *pReadmask)
+vfbWakeupHandler(void *blockData, int result)
{
}
diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c
index 7d3c35f9d..9a8f432a0 100644
--- a/hw/xfree86/common/xf86Events.c
+++ b/hw/xfree86/common/xf86Events.c
@@ -242,7 +242,7 @@ xf86ProcessActionEvent(ActionEvent action, void *arg)
/* ARGSUSED */
void
-xf86Wakeup(void *blockData, int err, void *pReadmask)
+xf86Wakeup(void *blockData, int err)
{
if (xf86VTSwitchPending())
xf86VTSwitch();
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 998100aa9..7a267f8ef 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -871,7 +871,7 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
xf86Resetting = FALSE;
xf86Initialising = FALSE;
- RegisterBlockAndWakeupHandlers((BlockHandlerProcPtr) NoopDDA, xf86Wakeup,
+ RegisterBlockAndWakeupHandlers((ServerBlockHandlerProcPtr) NoopDDA, xf86Wakeup,
NULL);
}
diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h
index 81f7294a9..c1f8a18d7 100644
--- a/hw/xfree86/common/xf86Priv.h
+++ b/hw/xfree86/common/xf86Priv.h
@@ -137,7 +137,7 @@ DoShowOptions(void)
/* xf86Events.c */
extern _X_EXPORT void
-xf86Wakeup(void *blockData, int err, void *pReadmask);
+xf86Wakeup(void *blockData, int err);
extern _X_HIDDEN int
xf86SigWrapper(int signo);
extern _X_EXPORT void
diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c
index d39924646..e4a21dc06 100644
--- a/hw/xfree86/dri/dri.c
+++ b/hw/xfree86/dri/dri.c
@@ -1667,7 +1667,7 @@ DRIDestroyInfoRec(DRIInfoPtr DRIInfo)
}
void
-DRIWakeupHandler(void *wakeupData, int result, void *pReadmask)
+DRIWakeupHandler(void *wakeupData, int result)
{
int i;
@@ -1681,7 +1681,7 @@ DRIWakeupHandler(void *wakeupData, int result, void *pReadmask)
}
void
-DRIBlockHandler(void *blockData, OSTimePtr pTimeout, void *pReadmask)
+DRIBlockHandler(void *blockData, void *pTimeout)
{
int i;
diff --git a/hw/xfree86/dri/dri.h b/hw/xfree86/dri/dri.h
index c659a207f..dfd2f827e 100644
--- a/hw/xfree86/dri/dri.h
+++ b/hw/xfree86/dri/dri.h
@@ -263,11 +263,9 @@ extern _X_EXPORT void DRIDestroyInfoRec(DRIInfoPtr DRIInfo);
extern _X_EXPORT Bool DRIFinishScreenInit(ScreenPtr pScreen);
-extern _X_EXPORT void DRIWakeupHandler(void *wakeupData,
- int result, void *pReadmask);
+extern _X_EXPORT void DRIWakeupHandler(void *wakeupData, int result);
-extern _X_EXPORT void DRIBlockHandler(void *blockData,
- OSTimePtr pTimeout, void *pReadmask);
+extern _X_EXPORT void DRIBlockHandler(void *blockData, void *timeout);
extern _X_EXPORT void DRIDoWakeupHandler(ScreenPtr pScreen, int result);
diff --git a/hw/xnest/Handlers.c b/hw/xnest/Handlers.c
index 05d559d8f..e90a6168f 100644
--- a/hw/xnest/Handlers.c
+++ b/hw/xnest/Handlers.c
@@ -32,14 +32,14 @@ is" without express or implied warranty.
#include "Handlers.h"
void
-xnestBlockHandler(void *blockData, OSTimePtr pTimeout, void *pReadMask)
+xnestBlockHandler(void *blockData, void *timout)
{
xnestCollectExposures();
XFlush(xnestDisplay);
}
void
-xnestWakeupHandler(void *blockData, int result, void *pReadMask)
+xnestWakeupHandler(void *blockData, int result)
{
xnestCollectEvents();
}
diff --git a/hw/xnest/Handlers.h b/hw/xnest/Handlers.h
index d4ad6d254..6ebcc8b98 100644
--- a/hw/xnest/Handlers.h
+++ b/hw/xnest/Handlers.h
@@ -15,8 +15,7 @@ is" without express or implied warranty.
#ifndef XNESTHANDLERS_H
#define XNESTHANDLERS_H
-void xnestBlockHandler(void *blockData, OSTimePtr pTimeout,
- void *pReadMask);
-void xnestWakeupHandler(void *blockData, int result, void *pReadMask);
+void xnestBlockHandler(void *blockData, void *timeout);
+void xnestWakeupHandler(void *blockData, int result);
#endif /* XNESTHANDLERS_H */
diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c
index 6daf385c2..c65a22fab 100644
--- a/hw/xwayland/xwayland.c
+++ b/hw/xwayland/xwayland.c
@@ -507,12 +507,12 @@ socket_handler(int fd, int ready, void *data)
}
static void
-wakeup_handler(void *data, int err, void *pRead)
+wakeup_handler(void *data, int err)
{
}
static void
-block_handler(void *data, OSTimePtr pTimeout, void *pRead)
+block_handler(void *data, void *timeout)
{
struct xwl_screen *xwl_screen = data;
diff --git a/include/dix.h b/include/dix.h
index f63606afa..ae9719ae9 100644
--- a/include/dix.h
+++ b/include/dix.h
@@ -208,28 +208,28 @@ extern _X_EXPORT int AlterSaveSetForClient(ClientPtr /*client */ ,
extern _X_EXPORT void DeleteWindowFromAnySaveSet(WindowPtr /*pWin */ );
-extern _X_EXPORT void BlockHandler(void *pTimeout,
- void *pReadmask);
+extern _X_EXPORT void BlockHandler(void *timeout);
-extern _X_EXPORT void WakeupHandler(int result,
- void *pReadmask);
+extern _X_EXPORT void WakeupHandler(int result);
void
- EnableLimitedSchedulingLatency(void);
+EnableLimitedSchedulingLatency(void);
void
- DisableLimitedSchedulingLatency(void);
+DisableLimitedSchedulingLatency(void);
-typedef void (*WakeupHandlerProcPtr) (void *blockData,
- int result,
- void *pReadmask);
+typedef void (*ServerBlockHandlerProcPtr) (void *blockData,
+ void *timeout);
-extern _X_EXPORT Bool RegisterBlockAndWakeupHandlers(BlockHandlerProcPtr blockHandler,
- WakeupHandlerProcPtr wakeupHandler,
+typedef void (*ServerWakeupHandlerProcPtr) (void *blockData,
+ int result);
+
+extern _X_EXPORT Bool RegisterBlockAndWakeupHandlers(ServerBlockHandlerProcPtr blockHandler,
+ ServerWakeupHandlerProcPtr wakeupHandler,
void *blockData);
-extern _X_EXPORT void RemoveBlockAndWakeupHandlers(BlockHandlerProcPtr blockHandler,
- WakeupHandlerProcPtr wakeupHandler,
+extern _X_EXPORT void RemoveBlockAndWakeupHandlers(ServerBlockHandlerProcPtr blockHandler,
+ ServerWakeupHandlerProcPtr wakeupHandler,
void *blockData);
extern _X_EXPORT void InitBlockAndWakeupHandlers(void);
diff --git a/miext/rootless/rootlessScreen.c b/miext/rootless/rootlessScreen.c
index 471656428..2ec0ae54d 100644
--- a/miext/rootless/rootlessScreen.c
+++ b/miext/rootless/rootlessScreen.c
@@ -603,7 +603,7 @@ RootlessQueueRedisplay(ScreenPtr pScreen)
* on select().
*/
static void
-RootlessBlockHandler(void *pbdata, OSTimePtr pTimeout, void *pReadmask)
+RootlessBlockHandler(void *pbdata, void *ptimeout)
{
ScreenPtr pScreen = pbdata;
RootlessScreenRec *screenRec = SCREENREC(pScreen);
@@ -616,7 +616,7 @@ RootlessBlockHandler(void *pbdata, OSTimePtr pTimeout, void *pReadmask)
}
static void
-RootlessWakeupHandler(void *data, int i, void *LastSelectMask)
+RootlessWakeupHandler(void *data, int result)
{
// nothing here
}
diff --git a/os/WaitFor.c b/os/WaitFor.c
index b82f82627..24e1afc81 100644
--- a/os/WaitFor.c
+++ b/os/WaitFor.c
@@ -208,7 +208,7 @@ WaitForSomething(int *pClientsReady)
XFD_COPYSET(&AllSockets, &LastSelectMask);
}
- BlockHandler((void *) &wt, (void *) &LastSelectMask);
+ BlockHandler(&wt);
if (NewOutputPending)
FlushAllOutput();
/* keep this check close to select() call to minimize race */
@@ -223,7 +223,7 @@ WaitForSomething(int *pClientsReady)
i = Select(MaxClients, &LastSelectMask, NULL, NULL, wt);
}
selecterr = GetErrno();
- WakeupHandler(i, (void *) &LastSelectMask);
+ WakeupHandler(i);
if (i <= 0) { /* An error or timeout occurred */
if (dispatchException)
return 0;