Skip to content
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

replace select with poll in nopoll #36

Open
wants to merge 3 commits into
base: nopoll_yocto
Choose a base branch
from

Conversation

bill1600
Copy link

Replace select with poll in nopoll.

@CLAassistant
Copy link

CLAassistant commented Jul 10, 2019

CLA assistant check
All committers have signed the CLA.

@@ -66,7 +66,7 @@ noPollPtr nopoll_io_wait_select_create (noPollCtx * ctx)
*
* @param fd_group The fd group to be deallocated.
*/
void nopoll_io_wait_select_destroy (noPollCtx * ctx, noPollPtr fd_group)
void nopoll_io_wait_select_destroy (noPollCtx * ctx, noPollPtr __fd_group)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

variables with double underscores are generally reserved by libc as private namespace.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Numerous nopoll modules violate this rule, with numerous function names, parameter names, and variable names that start with double underscores.
So the question for us would be how to deal with software we didn't write that has already been written to a standard we don't agree with.
In this specific case, I thought it was best to just conform to the naming convention already being used in this module, nopoll_io.c.

@@ -216,7 +216,8 @@
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/select.h>
/* #include <sys/select.h> */
#define NOPOLL_HAVE_POLL 1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be automatically detected with autoconf if not then we should add the test to configure script.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will try without the #define.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants