Hi,

On Wed, Jan 7, 2009 at 2:21 PM, PAtrick Gerber <kpa_i...@yahoo.fr> 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 for
kobject-example it could be a problem
because you don't have a file operations in this example. But thats
only 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.beli...@gmail.com> a écrit :
>
>> De: Belisko Marek <marek.beli...@gmail.com>
>> Objet: Re: sysfs_notify & poll
>> À: "PAtrick Gerber" <kpa_i...@yahoo.fr>
>> Date: Mercredi 7 Janvier 2009, 13h59
>> Hi,
>>
>> On Wed, Jan 7, 2009 at 1:54 PM, PAtrick Gerber
>> <kpa_i...@yahoo.fr> 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_i...@yahoo.fr> 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-nandra
Ruská Nová Ves 219
08005 Prešov
Slovakia
http://open-nandra.com
N�����r��y����b�X��ǧu�ޙ���+a�{.n�+���z�ޖw�n'����j�b�ye�{������z��v�^�m���z�ޖw�n'���?

Reply via email to