[PATCH 01/11] dix: Refactor block and wakup handlers

Alan Coopersmith alan.coopersmith at oracle.com
Tue Jan 4 07:38:47 PST 2011


On 01/ 4/11 02:26 AM, Pauli Nieminen wrote:
> On 03/01/11 13:23 -0800, ext Alan Coopersmith wrote:
>> On 12/31/10 09:30 AM, Pauli wrote:
>>> From: Pauli Nieminen <ext-pauli.nieminen at nokia.com>
>>>
>>> It is common use case in server that only block or wakeup handler is
>>> used. To provide API for that case block handlers have to be split to
>>> separate structures.
>>>
>>> +extern _X_EXPORT Bool RegisterBlockHandler(
>>> +    BlockHandlerProcPtr /*blockHandler*/,
>>> +    pointer /*blockData*/);
>>> +
>>> +extern _X_EXPORT void RemoveBlockHandler(
>>> +    BlockHandlerProcPtr /*blockHandler*/,
>>> +    pointer /*blockData*/);
>>> +
>>> +extern _X_EXPORT Bool RegisterWakeupHandler(
>>> +    WakeupHandlerProcPtr /*wakeupHandler*/,
>>> +    pointer /*blockData*/);
>>> +
>>> +extern _X_EXPORT void RemoveWakeupHandler(
>>> +    WakeupHandlerProcPtr /*wakeupHandler*/,
>>> +    pointer /*blockData*/);
>>> +
>>
>> Seems like an excellent solution to the problem.   The docs should be
>> updated to match though, as in the attached patch you can merge into
>> this one.   (Yes, the style of the function declarations in those docs
>> still needs love, this matches the existing style for now.)
>>
> 
> Right. I'm going to add the documentation patch.
> 
> Looking at documentation. Is there any reason why it isn't embedded in code?

Because that's not the way it was written 20 years ago (I don't know if there
were any good/widespread tools for doing that in C at the time), and no one has
put in the effort to change it.    Feel free to add doxygen comments into the
code as well, there's a growing number of those already, but those tend to
provide a more simple reference manual style of documentation, with less of the
narrative structure of the current documentation - both are useful, depending
on whether you want to read a document to learn the system or just need a quick
reference to the arguments to a specific function.

BTW, for the docs I wrote, you should probably add a:
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
to the comments in the patch you merge it into.

-- 
	-Alan Coopersmith-        alan.coopersmith at oracle.com
	 Oracle Solaris Platform Engineering: X Window System



More information about the xorg-devel mailing list