Loading...
Searching...
No Matches
Go to the documentation of this file.
30#ifndef CHECKASM_LONGJMP_H
31#define CHECKASM_LONGJMP_H
35#if defined(_WIN32) && !(defined(__i386__) || defined(_M_IX86))
43 #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
50 #define checkasm_save_context(ctx) \
51 ((ctx).status = 0, RtlCaptureContext(&(ctx).c), (ctx).status)
52 #define checkasm_load_context(ctx) \
53 ((ctx).status = 1, RtlRestoreContext(&(ctx).c, NULL))
57#elif !defined(_WASI_EMULATED_SIGNAL)
63 #define checkasm_save_context(ctx) sigsetjmp(ctx, 1)
64 #define checkasm_load_context(ctx) siglongjmp(ctx, 1)
67 #define checkasm_save_context(ctx) setjmp(ctx)
68 #define checkasm_load_context(ctx) longjmp(ctx, 1)
73#ifdef checkasm_save_context
74 #define CHECKASM_HAVE_LONGJMP 1
78 #define checkasm_save_context(ctx) 0
79 #define checkasm_load_context(ctx)
80 #define CHECKASM_HAVE_LONGJMP 0