ReactOS 0.4.16-dev-1946-g52006dd
longjmp.c File Reference
#include <setjmp.h>
#include <windef.h>
Include dependency graph for longjmp.c:

Go to the source code of this file.

Macros

#define RtlUnwind   RtlUnwind_imported
 

Functions

VOID NTAPI RtlUnwind (_In_opt_ PVOID TargetFrame, _In_opt_ PVOID TargetIp, _In_opt_ PEXCEPTION_RECORD ExceptionRecord, _In_ PVOID ReturnValue)
 
 __declspec (noreturn)
 

Macro Definition Documentation

◆ RtlUnwind

#define RtlUnwind   RtlUnwind_imported

Definition at line 9 of file longjmp.c.

Function Documentation

◆ __declspec()

__declspec ( noreturn  )

Definition at line 22 of file longjmp.c.

29{
30 const _JUMP_BUFFER* jumpBuffer = (_JUMP_BUFFER*)_Buf;
31
32 /* Ensure _Value is non-zero */
33 _Value = (_Value == 0) ? 1 : _Value;
34
35 EXCEPTION_RECORD exceptionRecord = { 0 };
36 exceptionRecord.ExceptionCode = STATUS_LONGJUMP;
37 exceptionRecord.NumberParameters = 1;
38 exceptionRecord.ExceptionInformation[0] = (ULONG_PTR)jumpBuffer;
39
40 RtlUnwind((PVOID)jumpBuffer->Frame,
41 (PVOID)jumpBuffer->Lr,
42 &exceptionRecord,
44}
#define RtlUnwind
Definition: longjmp.c:9
_In_ _Value
#define ULONG_PTR
Definition: config.h:101
#define STATUS_LONGJUMP
Definition: ntstatus.h:297
DWORD ExceptionCode
Definition: compat.h:208
DWORD NumberParameters
Definition: compat.h:212
ULONG_PTR ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS]
Definition: compat.h:213
uint32_t ULONG_PTR
Definition: typedefs.h:65

◆ RtlUnwind()

VOID NTAPI RtlUnwind ( _In_opt_ PVOID  TargetFrame,
_In_opt_ PVOID  TargetIp,
_In_opt_ PEXCEPTION_RECORD  ExceptionRecord,
_In_ PVOID  ReturnValue 
)