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

build: Keep an autoconf check for pthread_setname_np() #4103

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dridi
Copy link
Member

@dridi dridi commented May 7, 2024

It is not portable by definition, so we should keep the guards.

dridi added 2 commits May 7, 2024 09:52
This reverts commit 41cdd27.

Even though everybody has a pthread_setname_np(3), they are different
and not portable by definition. The safeguards should be preserved
since THR_SetName() will at least allow a panic to get the thread name.
We can rely on pthread_setname_np() for all the platforms we care about.
The nested preprocessor conditions for pthread_setname_np are indented
to improve readability.

Better diff with the --ignore-all-space option.
@bsdphk
Copy link
Contributor

bsdphk commented May 13, 2024

First apologies for confusing everybody with a sign-error on the underscore

There is no reason to retain this check because all relevant platforms today have pthread_setname_np() and if somebody wants to port varnish to a new platform, they will have to provide a pthread_setname_np() function.

Please also note that the "_np" suffix literally means "POSIX is stuck in the 1990'ies where some people ran VMS", it doesnt mean that all contemporary platforms do not have it.

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

Successfully merging this pull request may close these issues.

None yet

2 participants