-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
android: add SUPPORTS_PTHREAD_GETNAME_NP definition #12011
android: add SUPPORTS_PTHREAD_GETNAME_NP definition #12011
Conversation
Signed-off-by: Alan Chiu <achiu@lyft.com>
Signed-off-by: Alan Chiu <achiu@lyft.com>
Signed-off-by: Alan Chiu <achiu@lyft.com>
@jmarantz think you made the original change, if you don't mind taking a look. |
Signed-off-by: Alan Chiu <achiu@lyft.com>
include/envoy/common/platform.h
Outdated
@@ -235,3 +235,15 @@ struct mmsghdr { | |||
unsigned int msg_len; | |||
}; | |||
#endif | |||
|
|||
#ifdef __linux__ | |||
#define SUPPORTS_PTHREAD_GETNAME_NP |
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.
suggest defining it to 1 or 0, rather than defining/not-defining it. That would make it less cumbersome to use in logical expressions at call-sites.
I think that's more consistent with other similar definitions in this file.
@@ -617,6 +617,7 @@ getaddrinfo | |||
getaffinity | |||
gethostname | |||
getifaddrs | |||
getname |
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.
it looks like this is not needed; maybe it was in an intermediate state of this PR?
If I'm wrong go ahead an put it back.
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.
It's complaining for the comment I wrote which uses pthread_getname_np
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.
pretty sure you can wrap the word in back ticks (maybe double back ticks?) to avoid the spell checker, i think thats the preferred way to handle these special words
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.
Looks fine generally, except for nits.
@envoyproxy/senior-maintainers
Signed-off-by: Alan Chiu <achiu@lyft.com>
Signed-off-by: Alan Chiu <achiu@lyft.com>
@jmarantz Thanks for reviewing! I updated the PR with your feedback |
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.
@envoyproxy/senior-maintainers
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, this looks good just one comment on the spelling stuff
@@ -617,6 +617,7 @@ getaddrinfo | |||
getaffinity | |||
gethostname | |||
getifaddrs | |||
getname |
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.
pretty sure you can wrap the word in back ticks (maybe double back ticks?) to avoid the spell checker, i think thats the preferred way to handle these special words
Signed-off-by: Alan Chiu <achiu@lyft.com>
Signed-off-by: Alan Chiu <achiu@lyft.com>
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Commenter does not have sufficient privileges for PR 12011 in repo envoyproxy/envoy |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
…-supports_pthread_getname_np-definition Signed-off-by: Alan Chiu <achiu@lyft.com>
/azp run |
Pull request contains merge conflicts. |
…-supports_pthread_getname_np-definition Signed-off-by: Alan Chiu <achiu@lyft.com>
@jmarantz Thank you for the approval again! |
thank you @junr03 @mattklein123 ! |
Signed-off-by: Alan Chiu <achiu@lyft.com> Signed-off-by: scheler <santosh.cheler@appdynamics.com>
Mirroring the PR: #11863
pthread_getname_np
is introduced in Android API 26Introduced here: #11440
For an explanation of how to fill out the fields, please see the relevant section
in PULL_REQUESTS.md
Commit Message: android: add SUPPORTS_PTHREAD_GETNAME_NP definition
Additional Description:
Risk Level: low
Testing: ci
Docs Changes: n/a
Release Notes: n/a
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Deprecated:]