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:
KJK::Hyperion 2008-11-12 20:39:18 +00:00
parent 27341b700f
commit e7584f9a3e
3 changed files with 26 additions and 0 deletions

View file

@ -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
}

View file

@ -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 */

View file

@ -21,6 +21,11 @@
.text
.intel_syntax noprefix
.globl __SEH2CurrentRegistration
__SEH2CurrentRegistration:
mov eax, [fs:0]
ret
.globl ___SEH2Except
___SEH2Except:
mov eax, [esp+4]