ReactOS 0.4.15-dev-7931-gfd331f1
seh0020.c File Reference
#include <windows.h>
#include <setjmp.h>
#include "seh.h"
Include dependency graph for seh0020.c:

Go to the source code of this file.

Functions

int main ()
 

Variables

char test [] = "SEH0020.c"
 

Function Documentation

◆ main()

int main ( void  )

Definition at line 11 of file seh0020.c.

11 {
12 jmp_buf JumpBuffer;
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}
_JBTYPE jmp_buf[_JBLEN]
Definition: setjmp.h:186
#define printf
Definition: freeldr.h:97
long LONG
Definition: pedump.c:60
static LARGE_INTEGER Counter
Definition: clock.c:43

Variable Documentation

◆ test

char test[] = "SEH0020.c"

Definition at line 9 of file seh0020.c.