_U_DYN_CANCEL(3libunwind)

πŸ“¦
version 1.8.3 Β· 2 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, epel 10, epel 9, fedora 43, fedora 44, nixpkgs unstable, opensuse-leap 16.0

πŸ’– _U_DYN_CANCEL β€” cancel unwind-info for dynamically generated code πŸ’–

okay bestie, welcome to the libunwind corner of the manual pages (it's 3libunwind, iykyk) and today we're talking about _U_dyn_cancel πŸŽ€


✨ NAME ✨

_U_dyn_cancel β€” cancel unwind-info for dynamically generated code πŸ¦‹


🌸 SYNOPSIS 🌸

#include <libunwind.h>

void _U_dyn_cancel(unw_dyn_info_t *di);

πŸ’… DESCRIPTION πŸ’…

So like, the _U_dyn_cancel() routine cancels the registration of the unwind info for a dynamically generated procedure. That's the whole vibe. You're telling libunwind "bestie, we're done here, take it off the books" πŸ’€

The argument di is the pointer to the unw_dyn_info_t structure that describes the procedure's unwind-info. That's your pointer, the one describing the thing, don't lose it πŸ‘‘

And here's the iconic part: the _U_dyn_cancel() routine is guaranteed to execute in constant time β€” but only in the absence of contention from concurrent calls to _U_dyn_register() or _U_dyn_cancel(). No cap, that's the actual guarantee, and it's giving main character energy ⭐

🫢 fr fr, remember that little parenthetical: constant time only holds when nobody else is out here hammering _U_dyn_register() or _U_dyn_cancel() at the same time. Concurrent calls = contention = not the chill constant-time moment you wanted.

🌈 THREAD AND SIGNAL SAFETY 🌈

  • _U_dyn_cancel() is thread safe βœ…
  • but it is not safe to use from a signal handler πŸ™ˆ

so go ahead and call it from your threads, just not from inside a signal handler, okay? that's the rule, periodt πŸ’œ


πŸ¦‹ SEE ALSO πŸ¦‹


πŸ‘‘ AUTHOR πŸ‘‘

David Mosberger-Tang


and that's the whole page bestie, no crumbs left πŸ“ this lil slice of the Programming Library is dated 29 August 2023, and yes the original header said _U_DYN_CANCEL(3libunwind) and the footer said the same β€” consider yourself fully briefed πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈ