Page MenuHomeFreeBSD

Implement epoll family system calls. This is a tiny wrapper around kqueue() to implement epoll subset of functionality. The kqueue user data are 32bit on i386 which is not enough for epoll user data, so we keep user data in the proc emuldata.
ClosedPublic

Authored by dchagin on Nov 3 2014, 8:31 AM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 7 2024, 5:03 AM
Unknown Object (File)
Jan 15 2024, 6:22 PM
Unknown Object (File)
Nov 21 2023, 5:26 PM
Unknown Object (File)
Nov 21 2023, 3:30 AM
Unknown Object (File)
Nov 21 2023, 1:37 AM
Unknown Object (File)
Nov 17 2023, 7:18 AM
Unknown Object (File)
Nov 11 2023, 7:16 AM
Unknown Object (File)
Nov 11 2023, 3:54 AM
Subscribers

Details

Summary

Initial patch developed by rdivacky@ in 2007, then extended
by Yuri Victorovich @ r255672 and finished by me
in collaboration with mjg@.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dchagin retitled this revision from to Implement epoll family system calls. This is a tiny wrapper around kqueue() to implement epoll subset of functionality. The kqueue user data are 32bit on i386 which is not enough for epoll user data, so we keep user data in the proc emuldata..
dchagin updated this object.

I hadn't reviewed the code yet, but had you considered implementing epoll() for FreeBSD binaries and then adding a Linux wrapper, like you did with eg. ppoll? In the long run this should make life a lot easier for ports folks. The ppoll() implementation already helped me with pesign port :-)

In D1092#3, @trasz wrote:

I hadn't reviewed the code yet, but had you considered implementing epoll() for FreeBSD binaries and then adding a Linux wrapper, like you did with eg. ppoll? In the long run this should make life a lot easier for ports folks. The ppoll() implementation already helped me with pesign port :-)

Interesting thought. We should get this in first in my opinion, and evaluate a native epoll as a separate later item.

Okay, it can be easily done later.

native epoll? what the reason for? we have kevent

It's because of porting - the more Linux APIs we implement, the less work it takes to port software written for Linux to FreeBSD.

Check that user supplied epfd file descriptor is a kqueue file descriptor
a bit earlier as in epoll_to_kevent() we use epoll.
Reported by: trinity

I can't accept this revision myself, but I can put my hands up in celebration as a comment

\o/

Thanks for all your hard work getting this together and landed Dmitry :)

This revision was automatically updated to reflect the committed changes.