-
Notifications
You must be signed in to change notification settings - Fork 415
util/poll: kqueue
support
#11050
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
util/poll: kqueue
support
#11050
Conversation
a1ebaa6
to
c3b5c3a
Compare
#define OFI_EPOLL_EVT_HAS_INPUT(evt) evt.filter == EVFILT_READ | ||
#define OFI_EPOLL_EVT_HAS_OUTPUT(evt) evt.filter == EVFILT_WRITE | ||
#define OFI_EPOLL_EVT_HAS_ERR(evt) evt.flags & EV_ERROR | ||
#define OFI_EPOLL_EVT_DATA(evt) evt.udata | ||
#define OFI_EPOLL_EVT_EVENTS(evt) evt.filter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These macros need to be defined for the else
branch as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks - for both epoll
and poll
those are defined in L50-56 - didn't want to introduce more duplication than necessary. Please do let me know if you'd like those explicitly defined in corresponding #ifdef
branches to ease of understanding.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would reorganize these definitions as:
#ifdef HAVE_KQUEUE
L62-66
#else
L51-55
#endif
updated the line number to match the code shown here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the hint - I went further and reorganized ofi_epoll.h
so there is only one single conditional around each HAVE_EPOLL
and HAVE_KQUEUE
, which hopefully would improve readability.
Please squash the commits and add a component prefix to the commit title line, e.g. FYI, you can update the original commit and push with |
c3b5c3a
to
21716dd
Compare
21716dd
to
59ad1d9
Compare
Done, thanks for the suggestion! |
Thanks for the update. For the commit title, I mean changing the title of the commit itself. The PR title line is fine w/ or w/o the change. |
59ad1d9
to
a4bb096
Compare
oh, sorry for for that - I've updated the commit heading, thanks! |
The change adds `kqueue` support and allows scalable polling when `epoll` is not available for a platform. Signed-off-by: Ilia Sotnikov <isotnikov@vdura.com>
a4bb096
to
17743c8
Compare
The change adds
kqueue
support and allows scalable polling whenepoll
is not available for a platform.Signed-off-by: Ilia Sotnikov isotnikov@vdura.com