summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2015-09-01 11:20:04 -0700
committerAdam Jackson <ajax@redhat.com>2016-07-18 15:27:51 -0400
commitfb0802113b4c57819cba15d64baf79bf4148607e (patch)
treef040ef9bac4f3a13d4bf9191aa28503a93cd7709 /doc
parent410bc047480a9f98df678dc850bc6b99c3cfb5bf (diff)
Remove readmask from screen block/wakeup handler
With no users of the interface needing the readmask anymore, we can remove it from the argument passed to these functions. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/Xinput.xml8
-rw-r--r--doc/Xserver-spec.xml59
2 files changed, 20 insertions, 47 deletions
diff --git a/doc/Xinput.xml b/doc/Xinput.xml
index 083b10908..0e7fbda72 100644
--- a/doc/Xinput.xml
+++ b/doc/Xinput.xml
@@ -210,7 +210,7 @@ A sample InitInput implementation is shown below.
<literallayout class="monospaced">
InitInput(argc,argv)
{
- int i, numdevs, ReadInput();
+ int i, numdevs;
DeviceIntPtr dev;
LocalDevice localdevs[LOCAL_MAX_DEVS];
DeviceProc kbdproc, ptrproc, extproc;
@@ -224,12 +224,6 @@ InitInput(argc,argv)
open_input_devices (&amp;numdevs, localdevs);
/**************************************************************
- * Register a WakeupHandler to handle input when it is generated.
- ***************************************************************/
-
- RegisterBlockAndWakeupHandlers (NoopDDA, ReadInput, NULL);
-
- /**************************************************************
* Register the input devices with DIX.
***************************************************************/
diff --git a/doc/Xserver-spec.xml b/doc/Xserver-spec.xml
index 72a544b55..7867544e4 100644
--- a/doc/Xserver-spec.xml
+++ b/doc/Xserver-spec.xml
@@ -674,30 +674,22 @@ If WaitForSomething() decides it is about to do something that might block
routine called BlockHandler().
<blockquote>
<programlisting>
- void BlockHandler(pTimeout, pReadmask)
- pointer pTimeout;
- pointer pReadmask;
+ void BlockHandler(void *pTimeout)
</programlisting>
</blockquote>
The types of the arguments are for agreement between the OS and DDX
implementations, but the pTimeout is a pointer to the information
-determining how long the block is allowed to last, and the
-pReadmask is a pointer to the information describing the descriptors
-that will be waited on.
+determining how long the block is allowed to last.
</para>
<para>
-In the sample server, pTimeout is a pointer, and pReadmask is
-the address of the select() mask for reading.
+In the sample server, pTimeout is a pointer.
</para>
<para>
The DIX BlockHandler() iterates through the Screens, for each one calling
its BlockHandler. A BlockHandler is declared thus:
<blockquote>
<programlisting>
- void xxxBlockHandler(pScreen, pTimeout, pReadmask)
- ScreenPtr pScreen;
- pointer pTimeout;
- pointer pReadmask;
+ void xxxBlockHandler(ScreenPtr pScreen, void *pTimeout)
</programlisting>
</blockquote>
The arguments are a pointer to the Screen, and the arguments to the
@@ -709,27 +701,20 @@ block, even if it didn't actually block, it must call the DIX routine
WakeupHandler().
<blockquote>
<programlisting>
- void WakeupHandler(result, pReadmask)
- int result;
- pointer pReadmask;
+ void WakeupHandler(int result)
</programlisting>
</blockquote>
Once again, the types are not specified by DIX. The result is the
-success indicator for the thing that (may have) blocked,
-and the pReadmask is a mask of the descriptors that came active.
-In the sample server, result is the result from select() (or equivalent
-operating system function), and pReadmask is
-the address of the select() mask for reading.
+success indicator for the thing that (may have) blocked.
+In the sample server, result is the result from select() (or equivalent
+operating system function).
</para>
<para>
The DIX WakeupHandler() calls each Screen's
WakeupHandler. A WakeupHandler is declared thus:
<blockquote>
<programlisting>
- void xxxWakeupHandler(pScreen, result, pReadmask)
- ScreenPtr pScreen;
- unsigned long result;
- pointer pReadmask;
+ void xxxWakeupHandler(ScreenPtr pScreen, int result)
</programlisting>
</blockquote>
The arguments are the Screen, of the Screen, and the arguments to
@@ -741,8 +726,8 @@ block and wakeup handlers (only together) using:
<blockquote>
<programlisting>
Bool RegisterBlockAndWakeupHandlers (blockHandler, wakeupHandler, blockData)
- BlockHandlerProcPtr blockHandler;
- WakeupHandlerProcPtr wakeupHandler;
+ ServerBlockHandlerProcPtr blockHandler;
+ ServerWakeupHandlerProcPtr wakeupHandler;
pointer blockData;
</programlisting>
</blockquote>
@@ -752,8 +737,8 @@ memory. To remove a registered Block handler at other than server reset time
<blockquote>
<programlisting>
RemoveBlockAndWakeupHandlers (blockHandler, wakeupHandler, blockData)
- BlockHandlerProcPtr blockHandler;
- WakeupHandlerProcPtr wakeupHandler;
+ ServerBlockHandlerProcPtr blockHandler;
+ ServerWakeupHandlerProcPtr wakeupHandler;
pointer blockData;
</programlisting>
</blockquote>
@@ -761,18 +746,15 @@ All three arguments must match the values passed to
RegisterBlockAndWakeupHandlers.
</para>
<para>
-These registered block handlers are called after the per-screen handlers:
+These registered block handlers are called before the per-screen handlers:
<blockquote>
<programlisting>
- void (*BlockHandler) (blockData, pptv, pReadmask)
- pointer blockData;
- OsTimerPtr pptv;
- pointer pReadmask;
+ void (*ServerBlockHandler) (void *blockData, void *pTimeout)
</programlisting>
</blockquote>
</para>
<para>
-Sometimes block handlers need to adjust the time in a OSTimePtr structure,
+Sometimes block handlers need to adjust the time referenced by pTimeout,
which on UNIX family systems is generally represented by a struct timeval
consisting of seconds and microseconds in 32 bit values.
As a convenience to reduce error prone struct timeval computations which
@@ -780,20 +762,17 @@ require modulus arithmetic and correct overflow behavior in the face of
millisecond wrapping through 32 bits,
<blockquote><programlisting>
- void AdjustWaitForDelay(pointer /*waitTime*, unsigned long /* newdelay */)
+ void AdjustWaitForDelay(void *pTimeout, unsigned long newdelay)
</programlisting></blockquote>
has been provided.
</para>
<para>
Any wakeup handlers registered with RegisterBlockAndWakeupHandlers will
-be called before the Screen handlers:
+be called after the Screen handlers:
<blockquote><programlisting>
- void (*WakeupHandler) (blockData, err, pReadmask)
- pointer blockData;
- int err;
- pointer pReadmask;
+ void (*ServerWakeupHandler) (void *blockData, int result)
</programlisting></blockquote>
</para>
<para>