ReactOS  0.4.15-dev-3299-gbe8e5fc
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"
 
int perfect
 

Function Documentation

◆ main()

int main ( void  )

Definition at line 12 of file seh0020.c.

12  {
13  jmp_buf JumpBuffer;
14  LONG Counter;
15 
16  Counter = 0;
17 
18  if (_setjmp(JumpBuffer) == 0) {
19  /* set counter = 1 */
20  //(volatile LONG) Counter += 1;
21  *(volatile LONG*)&Counter += 1;
22  longjmp(JumpBuffer, 1);
23  } else {
24  /* set counter = 2 */
25  //(volatile LONG) Counter += 1;
26  *(volatile LONG*)&Counter += 1;
27  }
28 
29  if (Counter != 2) {
30  printf("TEST 20 FAILED. Counter = %d\n\r", Counter);
31  return -1;
32  }
33 
34  return 0;
35 }
long LONG
Definition: pedump.c:60
_JBTYPE jmp_buf[_JBLEN]
Definition: setjmp.h:160
static LARGE_INTEGER Counter
Definition: clock.c:43
#define printf
Definition: config.h:203

Variable Documentation

◆ perfect

int perfect

Definition at line 10 of file seh0020.c.

◆ test

char test[] = "SEH0020.c"

Definition at line 9 of file seh0020.c.