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 Tue, 15 Oct 2002, John Myers wrote:

    > Davide Libenzi wrote:
    >
    > >Just a simple question : Have you ever used RT-Signal API ? Is it the API
    > >"deficent" [...] ?
    > >
    > No. Yes. The (fixed) size of the signal queue is far too small. One
    > either gets catastrophic failure on overload or one has to pay to do
    > redundant accounting of interest.
    >
    > >Do you know the
    > >difference between level triggered ( poll() - select() - /dev/poll ) and
    > >edge triggered ( /dev/epoll - RT-Signal ) interfaces ?
    > >
    > >
    > Yes. The registration of interest can itself be considered an edge
    > condition.

    I knew you were going there, aka you do not understand how edge triggered
    API have to be used. 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. The code scheme for an
    edge triggered API is :

    int my_io(...) {

    while (do_io(...) == EAGAIN)
    event_wait(...);

    }

    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.



    - 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:0.020 / U:0.696 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site