HomeFreeBSD

Unbreak FreeBSD cross-build on MacOS broken in 051460b8b

Description

Unbreak FreeBSD cross-build on MacOS broken in 051460b8b

MacOS used FreeBSD-compatible getprogname() and pthread_getname_np().
But pthread_getthreadid_np() does not exist on MacOS. This implements
libspl_gettid() using pthread_threadid_np() to get the thread id
of the current thread.

Tested with FreeBSD GitHub actions
freebsd-src/.github/workflows/cross-bootstrap-tools.yml

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rob Norris <rob.norris@klarasystems.com>
Signed-off-by: Martin Matuska <mm@FreeBSD.org>
Closes #16167

Details

Provenance
mmAuthored on May 9 2024, 2:42 PM
Tony Hutter <hutter2@llnl.gov>Committed on Jul 17 2024, 9:54 PM
Parents
rG88686213c380: libspl/assert: use libunwind for backtrace when available
Branches
Unknown
Tags
Unknown