Re: sysfs_notify & poll

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

 



Hi,
On Wed, Jan 7, 2009 at 2:21 PM, PAtrick Gerber <kpa_info@xxxxxxxx> wrote:> Thanks for the information.>> I have tested with the example from http://linux.die.net/man/3/poll slightly modified (see the attached file).> If I test pool on the "/sys/module/systest/sections/.data" file it seems to work fine. But if I try the same test application with my attribute (/sys/kernel/kobject_example/bar) created with the example from linux sources (samples/kobject/kobject_example.c) the result is an event POLLERR.
>> Do you have any idea why ? Need I to add special code for support poll syscall in my driver ?Of course you should implement poll syscall in kernel driver. But forkobject-example it could be a problembecause you don't have a file operations in this example. But thatsonly my feeling ;)Example for poll : (ldd3 http://lwn.net/images/pdf/LDD3/ch06.pdf )>> Thanks in advance>> --- En date de : Mer 7.1.09, Belisko Marek <marek.belisko@xxxxxxxxx> a écrit :>>> De: Belisko Marek <marek.belisko@xxxxxxxxx>>> Objet: Re: sysfs_notify & poll>> À: "PAtrick Gerber" <kpa_info@xxxxxxxx>>> Date: Mercredi 7 Janvier 2009, 13h59>> Hi,>>>> On Wed, Jan 7, 2009 at 1:54 PM, PAtrick Gerber>> <kpa_info@xxxxxxxx> wrote:>> > Ok thanks. Usefull example. But I have another>> question:>> >>> > Need I to use poll or epoll ? I dont really understand>> the difference.>> epoll is a variant of poll that can be used either as Edge>> or Level>> Triggered interface and scales well to large numbers of>> watched fds.>> For beginnig you can use normal poll syscall.>>>> >>> > Thanks in advance for any help !>> >>> > On Wed, Jan 7, 2009 at 9:40 AM, PAtrick Gerber>> <kpa_info@xxxxxxxx> wrote:>> >> Hello,>> >>>> >> I would like to try to use sysfs_notify() / poll()>> mechanism from my>> > driver>> >> to notify some events to my application. I'm>> looking for a tiny>> > example>> >> showing the use of this mechanism.>> >>>> >> The driver side with sysfs_notify seems quite>> simple but I have absolutely>> >> no idea about the application side.>> >>> > Fo poll method you canfind good description and also>> example at:>> > http://linux.die.net/man/3/poll>> >>> >>>> >> Thanks in advance>> >>>> >> Patrick>> >>>> >>> > thanks,>> >>> > Marek>> >>> >>> >>> >>> >>> >>> >>>>> thanks,>>>> Marek>>>> -->> as simple as primitive as possible>> ---------------------------------------------->> Marek Beliško - open-nandra>> Ruská Nová Ves 219>> 08005 Prešov>> Slovakia>> http://open-nandra.com>>>
thanks,
Marek
-- as simple as primitive as possible----------------------------------------------Marek Beliško - open-nandraRuská Nová Ves 21908005 PrešovSlovakiahttp://open-nandra.com��.n��������+%����w�j)p���{.n����z�ޖw�n'���q���b�������v��m�����Y�����


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux