lkml.org 
[lkml]   [2002]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] async poll for 2.5
    On Wed, 16 Oct 2002, John Gardiner Myers wrote:

    > Davide Libenzi wrote:
    >
    > >I knew you were going there, aka you do not understand how edge triggered
    > >API have to be used.
    > >
    > Nonsense.
    >
    > >Even if the API will drop an event at registration
    > >time you still cannot use this code scheme :
    > >
    > >int my_io(...) {
    > >
    > > if (event_wait(...))
    > > do_io(...);
    > >
    > >}
    > >
    > >You CAN NOT. And look, it is not an API problem, it's your problem that
    > >you want to use the API like a poll()-like API.
    > >
    > You have insufficient basis upon which to claim I would write code as
    > broken as above.

    Yes I have, look down 15 lines ...


    > >This because you have to consume the I/O space to push the level to 0 so
    > >that a transaction 0->1 can happen and you can happily receive your
    > >events.
    > >
    > >
    > Of course you have to consume the I/O space to push the level to 0.
    > What do you think I am, stupid?
    >
    > This is done with something like:
    >
    > for (;;) {
    > fd = event_wait(...);
    > while (do_io(fd) != EAGAIN);
    > }

    I told you did not understand the API, this code won't work for edge
    triggered APIs. Please consider investigating a little bit more before
    shooting to perfectly working APIs.




    - Davide


    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:30    [W:4.505 / U:0.120 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site