HomeFreeBSD

libspl/assert: show process/task details in assert output

Description

libspl/assert: show process/task details in assert output

Makes it much easier to see what thing complained.

Getting thread id, program name and thread name vary wildly between
Linux and FreeBSD, so those are set up in macros. pthread_getname_np()
did not appear in musl until very recently, but the same info has always
been available via prctl(PR_GET_NAME), so we use that instead.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rob Norris <robn@despairlabs.com>
Sponsored-by: https://despairlabs.com/sponsor/
Closes #16140

Details

Provenance
rob.norris_klarasystems.comAuthored on Apr 21 2024, 11:43 AM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on May 1 2024, 5:51 PM
Parents
rG4429ad9276ce: libzpool: set thread names
Branches
Unknown
Tags
Unknown