Skip to content

build, util: Add HAVE_PTHREAD_SETNAME_NP_2ARG configuration macro - #396

Open
hebasto wants to merge 2 commits into
bitcoin-core:masterfrom
hebasto:261115-setname_np2
Open

hebasto wants to merge 2 commits into
bitcoin-core:masterfrom
hebasto:261115-setname_np2

Conversation

@hebasto

@hebasto hebasto commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

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.

Additionally, the first commit documents the platforms for every branch in SetOsThreadName(), as suggested by ryanofsky in #324.

@DrahtBot

DrahtBot commented Nov 15, 2026 •

Copy link
Copy Markdown

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Reviews

See the guideline and AI policy for information on the review process.
A summary of reviews will appear here.

@hebasto
hebasto force-pushed the 261115-setname_np2 branch 2 times, most recently from 4f8bd3f to 0231925 Compare November 15, 2026 17:56
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.
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.

2 participants