ReactOS 0.4.16-dev-338-g34e76ad
framebased.h File Reference
#include <pseh/framebased/internal.h>
#include <pseh/excpt.h>
#include <stddef.h>
#include <setjmp.h>
Include dependency graph for framebased.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  __SEHFrame
 
struct  __SEHTryLevel
 

Macros

#define _SEHLongJmp   longjmp
 
#define _SEHSetJmp   setjmp
 
#define _SEHJmpBuf_t   jmp_buf
 
#define _SEH_INIT_CONST   register const
 
#define _SEH_ACCESS_LOCALS(LOCALS_)
 
#define _SEH_VAR(VAR_)   _SEHPLocals->VAR_
 
#define _SEH_FILTER(NAME_)
 
#define _SEH_STATIC_FILTER(ACTION_)   ((_SEHFilter_t)((ACTION_) + 2))
 
#define _SEH_WRAP_FILTER(WRAPPER_, NAME_)
 
#define _SEH_FINALLYFUNC(NAME_)
 
#define _SEH_WRAP_FINALLY(WRAPPER_, NAME_)    _SEH_WRAP_FINALLY_ARGS(WRAPPER_, NAME_, ())
 
#define _SEH_WRAP_FINALLY_ARGS(WRAPPER_, NAME_, ARGS_)
 
#define _SEH_WRAP_FINALLY_LOCALS_ARGS(WRAPPER_, LOCALS_, NAME_, ARGS_)
 
#define _SEH_DECLARE_HANDLERS(FILTER_, FINALLY_)
 
#define _SEH_SetExceptionCode(CODE_)   (_SEHPortableFrame->SPF_Code = (CODE_))
 
#define _SEH_GetExceptionCode()   (unsigned long)(_SEHPortableFrame->SPF_Code)
 
#define _SEH_GetExceptionPointers()    ((struct _EXCEPTION_POINTERS *)_SEHExceptionPointers)
 
#define _SEH_AbnormalTermination()   (_SEHPortableFrame->SPF_Code != 0)
 
#define _SEH_LEAVE   break
 
#define _SEH_YIELD(STMT_)
 
#define _SEH_TRY
 
#define _SEH_EXCEPT(FILTER_)
 
#define _SEH_FINALLY(FINALLY_)
 
#define _SEH_END
 
#define _SEH_HANDLE   _SEH_EXCEPT(_SEH_STATIC_FILTER(_SEH_EXECUTE_HANDLER))
 
#define _SEH_EnableTracing(LEVEL_)   ((void)(_SEHPortableFrame->SPF_Tracing = (LEVEL_)))
 
#define _SEH_DisableTracing()   ((void)(_SEHPortableFrame->SPF_Tracing = _SEH_DO_TRACE_NONE))
 

Typedefs

typedef struct __SEHFrame _SEHFrame_t
 
typedef struct __SEHTryLevel _SEHTryLevel_t
 

Functions

static __declspec (noreturn) __inline void __stdcall _SEHCompilerSpecificHandler(_SEHPortableTryLevel_t *trylevel)
 

Variables

static const int _SEHScopeKind = 1
 
static _SEHPortableFrame_t *const _SEHPortableFrame = 0
 
static _SEHPortableTryLevel_t *const _SEHPortableTryLevel = 0
 

Macro Definition Documentation

◆ _SEH_AbnormalTermination

#define _SEH_AbnormalTermination ( )    (_SEHPortableFrame->SPF_Code != 0)

Definition at line 163 of file framebased.h.

◆ _SEH_ACCESS_LOCALS

#define _SEH_ACCESS_LOCALS (   LOCALS_)
Value:
_SEH_LOCALS_TYPENAME(LOCALS_) * _SEHPLocals; \
_SEHPLocals = \
( \
_SEH_LOCALS_TYPENAME(LOCALS_) *, \
_SEH_CONTAINING_RECORD(_SEHPortableFrame, _SEHFrame_t, SEH_Header) \
->SEH_Locals \
);
static _SEHPortableFrame_t *const _SEHPortableFrame
Definition: framebased.h:84
#define _SEH_LOCALS_TYPENAME(BASENAME_)
Definition: pseh.h:65
#define _SEH_PVOID_CAST(TYPE_, P_)
Definition: pseh.h:30

Definition at line 89 of file framebased.h.

◆ _SEH_DECLARE_HANDLERS

#define _SEH_DECLARE_HANDLERS (   FILTER_,
  FINALLY_ 
)
Value:
_SEHHandlers_t _SEHHandlers = { (0), (0) }; \
_SEHHandlers.SH_Filter = (FILTER_); \
_SEHHandlers.SH_Finally = (FINALLY_);
_SEHFilter_t SH_Filter
Definition: internal.h:83
_SEHFinally_t SH_Finally
Definition: internal.h:84

Definition at line 151 of file framebased.h.

◆ _SEH_DisableTracing

#define _SEH_DisableTracing ( )    ((void)(_SEHPortableFrame->SPF_Tracing = _SEH_DO_TRACE_NONE))

Definition at line 373 of file framebased.h.

◆ _SEH_EnableTracing

#define _SEH_EnableTracing (   LEVEL_)    ((void)(_SEHPortableFrame->SPF_Tracing = (LEVEL_)))

Definition at line 372 of file framebased.h.

◆ _SEH_END

#define _SEH_END
Value:
} \
} \
\
if(_SEHTopTryLevel) \
_SEHLeaveFrame(); \
\
break; \
}

Definition at line 358 of file framebased.h.

◆ _SEH_EXCEPT

#define _SEH_EXCEPT (   FILTER_)

Definition at line 274 of file framebased.h.

◆ _SEH_FILTER

#define _SEH_FILTER (   NAME_)
Value:
long __stdcall NAME_ \
( \
struct _EXCEPTION_POINTERS * _SEHExceptionPointers, \
)
#define __stdcall
Definition: typedefs.h:25

Definition at line 104 of file framebased.h.

◆ _SEH_FINALLY

#define _SEH_FINALLY (   FINALLY_)

Definition at line 319 of file framebased.h.

◆ _SEH_FINALLYFUNC

#define _SEH_FINALLYFUNC (   NAME_)
Value:
void __stdcall NAME_ \
( \
)

Definition at line 123 of file framebased.h.

◆ _SEH_GetExceptionCode

#define _SEH_GetExceptionCode ( )    (unsigned long)(_SEHPortableFrame->SPF_Code)

Definition at line 158 of file framebased.h.

◆ _SEH_GetExceptionPointers

#define _SEH_GetExceptionPointers ( )     ((struct _EXCEPTION_POINTERS *)_SEHExceptionPointers)

Definition at line 160 of file framebased.h.

◆ _SEH_HANDLE

Definition at line 370 of file framebased.h.

◆ _SEH_INIT_CONST

#define _SEH_INIT_CONST   register const

Definition at line 56 of file framebased.h.

◆ _SEH_LEAVE

#define _SEH_LEAVE   break

Definition at line 165 of file framebased.h.

◆ _SEH_SetExceptionCode

#define _SEH_SetExceptionCode (   CODE_)    (_SEHPortableFrame->SPF_Code = (CODE_))

Definition at line 157 of file framebased.h.

◆ _SEH_STATIC_FILTER

#define _SEH_STATIC_FILTER (   ACTION_)    ((_SEHFilter_t)((ACTION_) + 2))

Definition at line 112 of file framebased.h.

◆ _SEH_TRY

#define _SEH_TRY
Value:
for(;;) \
{ \
_SEH_INIT_CONST int _SEHTopTryLevel = (_SEHScopeKind != 0); \
_SEHPortableFrame_t * const _SEHCurPortableFrame = _SEHPortableFrame; \
_SEHPortableTryLevel_t * const _SEHPrevPortableTryLevel = _SEHPortableTryLevel; \
\
{ \
register int _SEHState = 0; \
register int _SEHHandle = 0; \
_SEHFrame_t _SEHFrame; \
_SEHTryLevel_t _SEHTryLevel; \
_SEHTopTryLevel ? &_SEHFrame.SEH_Header : _SEHCurPortableFrame; \
\
(void)_SEHHandle; \
\
for(;;) \
{ \
if(_SEHState) \
{ \
for(;;) \
{ \
{
static const int _SEHScopeKind
Definition: framebased.h:83
#define _SEH_INIT_CONST
Definition: framebased.h:56
static _SEHPortableTryLevel_t *const _SEHPortableTryLevel
Definition: framebased.h:85
_SEHPortableFrame_t SEH_Header
Definition: framebased.h:61
_SEHPortableTryLevel_t ST_Header
Definition: framebased.h:68

Definition at line 244 of file framebased.h.

◆ _SEH_VAR

#define _SEH_VAR (   VAR_)    _SEHPLocals->VAR_

Definition at line 100 of file framebased.h.

◆ _SEH_WRAP_FILTER

#define _SEH_WRAP_FILTER (   WRAPPER_,
  NAME_ 
)
Value:
static __inline _SEH_FILTER(WRAPPER_) \
{ \
return (NAME_)(_SEHExceptionPointers); \
}
#define _SEH_FILTER(NAME_)
Definition: framebased.h:104

Definition at line 115 of file framebased.h.

◆ _SEH_WRAP_FINALLY

#define _SEH_WRAP_FINALLY (   WRAPPER_,
  NAME_ 
)     _SEH_WRAP_FINALLY_ARGS(WRAPPER_, NAME_, ())

Definition at line 130 of file framebased.h.

◆ _SEH_WRAP_FINALLY_ARGS

#define _SEH_WRAP_FINALLY_ARGS (   WRAPPER_,
  NAME_,
  ARGS_ 
)
Value:
static __inline _SEH_FINALLYFUNC(WRAPPER_) \
{ \
NAME_ ARGS_; \
}
#define _SEH_FINALLYFUNC(NAME_)
Definition: framebased.h:123

Definition at line 133 of file framebased.h.

◆ _SEH_WRAP_FINALLY_LOCALS_ARGS

#define _SEH_WRAP_FINALLY_LOCALS_ARGS (   WRAPPER_,
  LOCALS_,
  NAME_,
  ARGS_ 
)
Value:
static __inline _SEH_FINALLYFUNC(WRAPPER_) \
{ \
_SEH_ACCESS_LOCALS(LOCALS_); \
NAME_ ARGS_; \
}

Definition at line 139 of file framebased.h.

◆ _SEH_YIELD

#define _SEH_YIELD (   STMT_)
Value:
for(;;) \
{ \
_SEHReturn(); \
\
STMT_; \
}

Definition at line 167 of file framebased.h.

◆ _SEHJmpBuf_t

#define _SEHJmpBuf_t   jmp_buf

Definition at line 50 of file framebased.h.

◆ _SEHLongJmp

#define _SEHLongJmp   longjmp

Definition at line 48 of file framebased.h.

◆ _SEHSetJmp

#define _SEHSetJmp   setjmp

Definition at line 49 of file framebased.h.

Typedef Documentation

◆ _SEHFrame_t

◆ _SEHTryLevel_t

Function Documentation

◆ __declspec()

static __declspec ( noreturn  )
static

Definition at line 73 of file framebased.h.

77{
78 _SEHTryLevel_t * mytrylevel;
79 mytrylevel = _SEH_CONTAINING_RECORD(trylevel, _SEHTryLevel_t, ST_Header);
80 _SEHLongJmp(mytrylevel->ST_JmpBuf, 1);
81}
#define _SEHLongJmp
Definition: framebased.h:48
#define _SEH_CONTAINING_RECORD(ADDR_, TYPE_, FIELD_)
Definition: pseh.h:43
_SEHJmpBuf_t ST_JmpBuf
Definition: framebased.h:69

Variable Documentation

◆ _SEHPortableFrame

_SEHPortableFrame_t* const _SEHPortableFrame = 0
static

Definition at line 84 of file framebased.h.

◆ _SEHPortableTryLevel

_SEHPortableTryLevel_t* const _SEHPortableTryLevel = 0
static

Definition at line 85 of file framebased.h.

◆ _SEHScopeKind

const int _SEHScopeKind = 1
static

Definition at line 83 of file framebased.h.