aboutsummaryrefslogtreecommitdiffstats
path: root/config/user-backtrace.m4
diff options
context:
space:
mode:
authorRob Norris <[email protected]>2024-04-28 12:49:58 +1000
committerBrian Behlendorf <[email protected]>2024-05-01 10:51:54 -0700
commitdec697ad683ecfdf9833455af0568ce4ddc7c885 (patch)
tree56664c278f46e44a783ac4a42a901d2a3bd943ad /config/user-backtrace.m4
parent394800200e033f3a21dcbbf38a1e71b9d33b3b70 (diff)
libspl/assert: add lock around assertion output
If multiple threads trip an assertion at the same moment (quite common), they can be printing at the same time, and their output gets messy. This adds a simple lock around the whole thing, to prevent a second task printing assert output before the first has finished. Additionally, if libspl_assert_ok is not set, abort() is called without dropping the lock, so that any other asserting tasks will be killed before starting any output, rather than only getting part-way through. This is a tradeoff; it's assumed that multiple threads asserting at the same moment are likely the same fault in different instances of a thread, and so there won't be any more useful information from the other tasks anyway. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Rob Norris <[email protected]> Sponsored-by: https://despairlabs.com/sponsor/ Closes #16140
Diffstat (limited to 'config/user-backtrace.m4')
0 files changed, 0 insertions, 0 deletions