rust/tests/run-make-fulldeps/longjmp-across-rust/foo.c
2023-01-11 09:32:08 +00:00

19 lines
231 B
C

#include <assert.h>
#include <setjmp.h>
static jmp_buf ENV;
extern void test_middle();
void test_start(void(*f)()) {
if (setjmp(ENV) != 0)
return;
f();
assert(0);
}
void test_end() {
longjmp(ENV, 1);
assert(0);
}