Re: pls help a newbie:how XFree86 wrap functions in libc
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
Re: pls help a newbie:how XFree86 wrap functions in libc
On Tuesday 12 of August 2003 20:32, Bryan W. Headley wrote: Rafa Rzepecki wrote: On Tuesday 12 of August 2003 16:53, Bryan W. Headley wrote: 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. From XChangeFeedbackControl (3x11): BadDevice An invalid device was specified. The specified device does not exist or has not been opened by this client via XOpenInputDevice. And you can only XOpenDevice if it is not a core pointer: BadDevice An invalid device was specified. The specified device does not exist, or is the X keyboard or X pointer. [XOpenDevice (3x11)] Or maybe there is another way to manipulate feedbacks that I am not aware of and it helps to get this problem around? Could someone either to approve above valid or disprove it and show a way to manipulate feedbacks of the core pointer? But I think the LED feedback is very limited, both in terms of packet size, and in terms of reply. Sure, it is limited, but at least it's a way to setup bidirectional driver-userland communication thru the X protocol, and the packet size problem is just a matter of protocol design. And I really don't need any big packets, as the data I am going to exchange is not very large in size. Another thing you can use is the xf86Misc message extension. The ati/radeon driver shows a stub of it (xf86HandleMessageProc) But isn't it only usable by display drivers? I believe that's what the message passing extension in Xext is going to do. I hope that's the same extension, and we don't have _three_ messaging APIs. I think so, I must have messed the names. My head is all buzzing with various X-words ;-). Excuse my stupidity, why are you not using GetTimeInMillis? Aren't you called gettimeofday? Oh. That's what Qian Tao asked about, I believe; not me. -- Rafa Rzepecki ___ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel
Re: pls help a newbie:how XFree86 wrap functions in libc
On Tuesday 12 of August 2003 16:53, Bryan W. Headley wrote: 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. From XChangeFeedbackControl (3x11): BadDevice An invalid device was specified. The specified device does not exist or has not been opened by this client via XOpenInputDevice. And you can only XOpenDevice if it is not a core pointer: BadDevice An invalid device was specified. The specified device does not exist, or is the X keyboard or X pointer. [XOpenDevice (3x11)] Or maybe there is another way to manipulate feedbacks that I am not aware of and it helps to get this problem around? But I think the LED feedback is very limited, both in terms of packet size, and in terms of reply. Sure, it is limited, but at least it's a way to setup bidirectional driver-userland communication thru the X protocol, and the packet size problem is just a matter of protocol design. And I really don't need any big packets, as the data I am going to exchange is not very large in size. Possibly, we can activate StringFeedback and at least get larger packets, (it's a one-line patch), As I said, packet size really doesn't matter as long as I can communicate anyhow. but until we do something using Atoms, you will suffer due endianness/sizeof intrinsics/padding issues. I believe that's what the message passing extension in Xext is going to do. Excuse my stupidity, why are you not using GetTimeInMillis? Could you elaborate? -- Rafa Rzepecki ___ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel
Re: pls help a newbie:how XFree86 wrap functions in libc
Rafa? Rzepecki wrote: Another thing you can use is the xf86Misc message extension. The ati/radeon driver shows a stub of it (xf86HandleMessageProc) But isn't it only usable by display drivers? I don't see anything that specifically says deliver this only to display drivers; on the other hand, I don't see where you get to specify WHICH device you are writing to. Every device driver serving Display* x, screen y? -- .:. Bryan W. Headley - [EMAIL PROTECTED] ___ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel
pls help a newbie:how XFree86 wrap functions in libc
Title: pls help a newbie:how XFree86 wrap functions in libc 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 Best Regards, RD Division SW30, Inventec (Shanghai) CO.,LTD Add.: 7F, No.1295, Yi Shan Rd., Shanghai, China P.C. : 200233 Tel.: +86(21) 54261366 Ext:1710 E-mail: Tao.Qian@inventec.com
Re: pls help a newbie:how XFree86 wrap functions in libc
Rafa³ Rzepecki wrote: On Tuesday 12 of August 2003 16:53, Bryan W. Headley wrote: 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. From XChangeFeedbackControl (3x11): BadDevice An invalid device was specified. The specified device does not exist or has not been opened by this client via XOpenInputDevice. And you can only XOpenDevice if it is not a core pointer: BadDevice An invalid device was specified. The specified device does not exist, or is the X keyboard or X pointer. [XOpenDevice (3x11)] Or maybe there is another way to manipulate feedbacks that I am not aware of and it helps to get this problem around? But I think the LED feedback is very limited, both in terms of packet size, and in terms of reply. Sure, it is limited, but at least it's a way to setup bidirectional driver-userland communication thru the X protocol, and the packet size problem is just a matter of protocol design. And I really don't need any big packets, as the data I am going to exchange is not very large in size. Another thing you can use is the xf86Misc message extension. The ati/radeon driver shows a stub of it (xf86HandleMessageProc) I believe that's what the message passing extension in Xext is going to do. I hope that's the same extension, and we don't have _three_ messaging APIs. Excuse my stupidity, why are you not using GetTimeInMillis? Aren't you called gettimeofday? -- .:. Bryan W. Headley - [EMAIL PROTECTED] ___ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel