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