longjmp is like return, which can jump out of a function, to the immediate caller. However, longjmp can return directly to a grandparent, great-grandparent, ... this happens without any unwind support; you have to invent your own conventions for that and implement them. Only carefully-written code which knows about the conventions of your particular longjmp wrapper library will get the unwinding.