Rivoreo Source Code Repositories
src.rivoreo.one
/
emulators
/
v86
/
7f981fdb066250b0574f6266873b7029b9be0375
/
.
/
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
;
}