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

include: compat.h, fix the return result of pthread_set_name() #20474

Merged
merged 1 commit into from Feb 19, 2018

Conversation

wjwithagen
Copy link
Contributor

On FreeBSD the function type is void(). Make it compatible with return
value on other platforms.

Signed-off-by: Willem Jan Withagen wjw@digiware.nl

On FreeBSD the function type is void(). Make it compatible with return
value on other platforms.

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
/* Fix a small name diff and return 0 */
#define ceph_pthread_setname(thread, name) ({ \
pthread_set_name_np(thread, name); \
0; })
Copy link
Contributor

Choose a reason for hiding this comment

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

no need to do this on GNU/Linux.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tchaikov
pthread_set_name_np is only found on FreeBSD.
Si I'd expect this to be only selected on FreeBSD.

Copy link
Contributor

@tchaikov tchaikov Feb 19, 2018

Choose a reason for hiding this comment

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

@tchaikov tchaikov merged commit 3b10d16 into ceph:master Feb 19, 2018
@wjwithagen wjwithagen deleted the wjw-wip-pthread_set_name_2 branch January 23, 2019 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants