Rafa? Rzepecki wrote:
On Tuesday 12 of August 2003 05:48, Tao, Qian (陶� IES) wrote:

I'm sorry,my english is not good
I want to add some code to
xc/program/Xserver/hw/xfree86/input/mouse/mouse.c I have to call some
functions in libc.
To my surprise,fprintf wok well,but,gettimeofday doesn't work
When I start my server,the server says:"This should not happen;An
unresolved function was called;Fatal server error"

I just cannot understand how XFree86 wrap functions in libc.
Pls help me, and you can give me some docs


What kind of functionality are you exactly trying to add?
IMHO you should not call libc functions directly in drivers, especially those manipulating files. It's bad practice, and AFAIK it's security breach, because drivers work as root.


I'm working on mouse.c personally, trying to add cordless mouse status reporting and some cordless-specific runtime control, such as RF channel switching. Unfortunately the only way I've found to communicate with userland is using shared memory (vide synaptics driver). But it has a drawback that it cannot be used to communicate with remote display, as it's not using the X protocol. One could try to communicate using LED feedbacks (like in citron driver), but there seem to be no way to manipulate feedbacks of the core pointer, so it's limited to extension devices. Or maybe I am mistaken, and there is a way?
Could someone more familiar with input drivers clarify it?



I'm not aware of any restriction with the mouse driver. But I think the LED feedback is very limited, both in terms of packet size, and in terms of reply. Possibly, we can activate StringFeedback and at least get larger packets, (it's a one-line patch), but until we do something using Atoms, you will suffer due endianness/sizeof intrinsics/padding issues.


Excuse my stupidity, why are you not using GetTimeInMillis?

OTOH, we could wait for the message passing in Xext to extend to input drivers, as I have read somewhere there is someone working on it. How's progress with that?


--
____               .:.                 ____
Bryan W. Headley - [EMAIL PROTECTED]

_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to