This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Documentation of eventfd_write and eventfd_read?


Maybe my wording somehow confused you.

I didn't use epoll_wait() to wait on the file descriptor I passed to eventfd_write.

I have filed a bug here: https://sourceware.org/bugzilla/show_bug.cgi?id=16524

If anyone is interested, you can check the feedback later.

Thanks all!



On Tuesday, February 4, 2014 12:37 AM, Carlos O'Donell <carlos@redhat.com> wrote:

On 02/01/2014 12:54 AM, Hei Chan wrote:
> Sounds like a bug that epoll_wait() doesn't return when
> eventfd_write() is called with zero as the 2nd argument?

It's a bug somewhere.

An eventfd_t value of 0 does not impact the fact that the
underlying write uses &value and writes the size of the
descriptor into the buffer.

That should be sufficient to wake any waiter that is
waiting on data.

The better question is:

Is it valid to use an eventfd fd in epoll_wait which
expects an epoll fd?

I don't know how well tested this is, but one would expect
it to work on any fd.


Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]