apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mladen Turk <mt...@apache.org>
Subject Re: apr_pollset, modifying reqevents
Date Tue, 27 Jun 2006 17:05:02 GMT
Paul Querna wrote:
> Mladen Turk wrote:
>> Hi,
>>
>> I propose a new function apr_poll_modify, or
>> modifying apr_poll_add to be able to change
>> the interest ops/events for a designated apr_pollfd_t.
> 
> And adding a modify to that API -- since it makes better assumptions 
> about the lifetimes of apr_pollfd_t's.  I don't think the _modify 
> paradigm will be easy to push onto the current apr_pollset API.
>

I think its not that complicated:

found = 0
for (...)
    if descriptor part of pollset
       found = 1

if  found
   ret = epoll_ctl(pollset->epoll_fd, EPOLL_CTL_MOD,
                   descriptor->desc.f->filedes, &ev);
else
   ret = epoll_ctl(pollset->epoll_fd, EPOLL_CTL_ADD,
                   descriptor->desc.f->filedes, &ev);

Regards,
Mladen.

Mime
View raw message