]> git.proxmox.com Git - mirror_zfs.git/commit
libspl/assert: show process/task details in assert output
authorRob Norris <robn@despairlabs.com>
Sun, 21 Apr 2024 11:43:53 +0000 (21:43 +1000)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 1 May 2024 17:51:49 +0000 (10:51 -0700)
commit394800200e033f3a21dcbbf38a1e71b9d33b3b70
treeae4650af7452a87003ce7b9dacd667b4c44db666
parent4429ad9276cea193bb29463a7d6c38367d0d78ce
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
config/user.m4
lib/libspl/assert.c