ReactOS
0.4.16-dev-306-g647d351
seh0020.c
Go to the documentation of this file.
1
// Copyright (c) Microsoft. All rights reserved.
2
// Licensed under the MIT license. See LICENSE file in the project root for
3
// full license information.
4
5
#include <windows.h>
6
#include <setjmp.h>
7
#include "
seh.h
"
8
9
char
test
[] =
"SEH0020.c"
;
10
11
int
main
() {
12
jmp_buf
JumpBuffer;
13
LONG
Counter
;
14
15
Counter
= 0;
16
17
if
(_setjmp(JumpBuffer) == 0) {
18
/* set counter = 1 */
19
//(volatile LONG) Counter += 1;
20
*(
volatile
LONG
*)&
Counter
+= 1;
21
longjmp(JumpBuffer, 1);
22
}
else
{
23
/* set counter = 2 */
24
//(volatile LONG) Counter += 1;
25
*(
volatile
LONG
*)&
Counter
+= 1;
26
}
27
28
if
(
Counter
!= 2) {
29
printf
(
"TEST 20 FAILED. Counter = %d\n\r"
,
Counter
);
30
return
-1;
31
}
32
33
return
0;
34
}
printf
#define printf
Definition:
freeldr.h:97
LONG
long LONG
Definition:
pedump.c:60
test
char test[]
Definition:
seh0020.c:9
main
int main()
Definition:
seh0020.c:11
seh.h
Counter
static LARGE_INTEGER Counter
Definition:
clock.c:43
jmp_buf
_JBTYPE jmp_buf[_JBLEN]
Definition:
setjmp.h:186
modules
rostests
apitests
compiler
ms
seh
seh0020.c
Generated on Mon Dec 2 2024 06:09:04 for ReactOS by
1.9.6