Rivoreo Source Code Repositories
src.rivoreo.one
/
emulators
/
v86
/
c017373c768c46732162670d971ffbac7c505adc
/
.
/
tests
/
kvm-unit-tests
/
x86
/
setjmp.c
blob: fa331792d852dac40e328f0db68a85015f451f2d [
file
] [
log
] [
blame
] [
raw
]
#include
"libcflat.h"
#include
"setjmp.h"
int
main
()
{
volatile
int
i
;
jmp_buf j
;
if
(
setjmp
(
j
)
==
0
)
{
i
=
0
;
}
printf
(
"%d\n"
,
i
);
if
(++
i
<
10
)
{
longjmp
(
j
,
1
);
}
printf
(
"done\n"
);
return
0
;
}