This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
// (c) M1lkweed, 2022-2023 | |
// Released as GPLv3+ | |
// Differences from normal setjmp: | |
// 1.) volatile is not required to prevent clobbering | |
// 2.) sizeof(xjmp_buf) is 8 | |
// 3.) xlongjmp can be used more than once per buffer | |
// 4.) reading the return value of xsetjmp is not UB | |
// 5.) all of the points also apply to the sig*jmp family |