[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Hurd CVS and X Debugging [Was: Re: Plans for X]

Marcus, a suggestion to try....

On Tue, Oct 24, 2000 at 05:43:23PM +0200, Marcus Brinkmann wrote:
> Yes, also strange, because the code is almost the same.
> Also, opening/closing the kbd device 5000 times in a small program also
> worked fine.

Well, the translator code is almost the same, but the X code is not.
The only differences I note in the translators seem insignificant or
irrelevant.  They are:

    different buffer size (do size = 1 and != 1 require different
	handling? this seems like a boundary case)
    mouse has option support
    kbd has ioctl support
    slight difference wrt demuxer
    slight difference in close_hook
    slight difference in *_thread ncopy loop (is one off-by-one?)

In X, the differences seem more significant.  Ref:

The mouse open in xf86OpenSerial looks like any ordinary fd open, except
it's wrapped with SYSCALL which is just:

#define SYSCALL(call) while(((call) == -1) && (errno == EINTR))

The keyboard open in xf86OpenConsole however uses get_privileged_ports()
and mach_port_deallocate(), i.e., it is mach/hurd-specific.  I don't
known what that means, but they're not the same.  Just hacking around
to see what would happen, I did a few variations: taking out the
get_privileged_ports() and mach_port_deallocate() calls to make the kbd
code look like the mouse code resulted in "computer bought the farm"
errors.  Putting them back and just leaving in a SYSCALL wrapper as is
done for the mouse code results in a hang.  That's about when I decided
to go looking at the translator code for differences.  Obviously, I'm
just fishing here....

The next thing would have been to explore the differences in the X code
some more (since your kbd test program seems to like the translator code).
It occurs to me that since you already have a working kbd test program,
to try patching it into xf86OpenConsole and see what happens.


Steve Bowman  <sbowman@frostwork.net> (preferred)
Buckeye, AZ   <sbowman@goodnet.com> <bowmanc@acm.org>

Powered by Debian GNU/Linux and GNU/Hurd <http://www.debian.org>

Reply to: