Repository navigation
build, util: Add HAVE_PTHREAD_SETNAME_NP_2ARG configuration macro - #396
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline and AI policy for information on the review process.
If your review is incorrectly listed, please copy-paste |
0231925 to
1a59d5d
Compare
ryanofsky
left a comment
There was a problem hiding this comment.
Code review ACK 1a59d5d. This fixes the "has OS thread name" tests on illumos, which have failed there since #324 added them: SetOsThreadName() had no branch for illumos's 2-argument pthread_setname_np(), so threads were left unnamed, while the tests still ran because pthread_getname_np() is available.
Thanks for adding the comments from #324, too!
On platforms that provide only the 2-argument `pthread_setname_np()` function, such as illumos, none of the branches in `SetOsThreadName()` matches, so threads are left unnamed. As `pthread_getname_np()` is available there, the thread name tests fail. Introduce the `HAVE_PTHREAD_SETNAME_NP_2ARG` configuration macro, which represents the availability of that function, and use it in `SetOsThreadName()`. Platforms already handled by another branch are not affected.
1a59d5d to
fb0e194
Compare
ryanofsky
left a comment
There was a problem hiding this comment.
Code review ACK fb0e194. This fixes the "has OS thread name" tests on illumos, confirmed by the OpenIndiana job in #393, which is now based on this PR and passes all three tests (its remaining failure is the unrelated listen test).
The only change since my last review is the expanded illumos comment, thanks!
On platforms that provide only the 2-argument
pthread_setname_np()function, such as illumos, none of the branches inSetOsThreadName()matches, so threads are left unnamed. Aspthread_getname_np()is available there, the thread name tests fail.Introduce the
HAVE_PTHREAD_SETNAME_NP_2ARGconfiguration macro, which represents the availability of that function, and use it inSetOsThreadName().Platforms already handled by another branch are not affected.
Additionally, the first commit documents the platforms for every branch in
SetOsThreadName(), as suggested by ryanofsky in #324.