mirror of
https://github.com/reactos/reactos.git
synced 2025-04-22 13:10:39 +00:00
modified include/reactos/libs/pseh/pseh2.h
modified lib/pseh/framebased-gcchack.c modified lib/pseh/i386/framebased-gcchack.S Implemented _SEH2_YIELD and _SEH2_LEAVE - 2.0 equivalents of _SEH_YIELD and _SEH_LEAVE, naturally svn path=/trunk/; revision=37318
This commit is contained in:
parent
27341b700f
commit
e7584f9a3e
3 changed files with 26 additions and 0 deletions
|
@ -340,6 +340,17 @@ _SEHTryLevel_t;
|
|||
#define _SEH2_GetExceptionPointers() ((struct _EXCEPTION_POINTERS *)_SEHExceptionPointers)
|
||||
#define _SEH2_GetExceptionCode() ((_SEHFrameP)->SF_Code)
|
||||
|
||||
#define _SEH2_YIELD(STMT_) \
|
||||
for(;;) \
|
||||
{ \
|
||||
if(!_SEHScopeKind) \
|
||||
_SEH2Return(); \
|
||||
\
|
||||
STMT_; \
|
||||
}
|
||||
|
||||
#define _SEH2_LEAVE goto _SEHEndTry
|
||||
|
||||
__SEH_END_SCOPE_CHAIN;
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -349,6 +360,7 @@ extern "C"
|
|||
|
||||
extern void __cdecl _SEH2EnterFrame(_SEHFrame_t *);
|
||||
extern void __cdecl _SEH2LeaveFrame(void);
|
||||
extern void __cdecl _SEH2Return(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
|
||||
#include <excpt.h>
|
||||
|
||||
extern _SEHRegistration_t * __cdecl _SEH2CurrentRegistration(void);
|
||||
|
||||
extern int __SEH2Except(void *, void *, void *);
|
||||
extern void __SEH2Finally(void *, void *);
|
||||
|
||||
|
@ -156,4 +158,11 @@ void __cdecl _SEH2LeaveFrame()
|
|||
);
|
||||
}
|
||||
|
||||
extern
|
||||
void __cdecl _SEH2Return(void)
|
||||
{
|
||||
_SEH2LocalUnwind(CONTAINING_RECORD(_SEH2CurrentRegistration(), _SEHFrame_t, SF_Registration), NULL);
|
||||
_SEH2LeaveFrame();
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
|
|
@ -21,6 +21,11 @@
|
|||
.text
|
||||
.intel_syntax noprefix
|
||||
|
||||
.globl __SEH2CurrentRegistration
|
||||
__SEH2CurrentRegistration:
|
||||
mov eax, [fs:0]
|
||||
ret
|
||||
|
||||
.globl ___SEH2Except
|
||||
___SEH2Except:
|
||||
mov eax, [esp+4]
|
||||
|
|
Loading…
Reference in a new issue