Author: hyperion
Date: Wed Nov 12 14:39:18 2008
New Revision: 37318
URL:
http://svn.reactos.org/svn/reactos?rev=37318&view=rev
Log:
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
Modified:
trunk/reactos/include/reactos/libs/pseh/pseh2.h
trunk/reactos/lib/pseh/framebased-gcchack.c
trunk/reactos/lib/pseh/i386/framebased-gcchack.S
Modified: trunk/reactos/include/reactos/libs/pseh/pseh2.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/libs/pseh/…
==============================================================================
--- trunk/reactos/include/reactos/libs/pseh/pseh2.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/libs/pseh/pseh2.h [iso-8859-1] Wed Nov 12 14:39:18 2008
@@ -340,6 +340,17 @@
#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 void __cdecl _SEH2EnterFrame(_SEHFrame_t *);
extern void __cdecl _SEH2LeaveFrame(void);
+extern void __cdecl _SEH2Return(void);
#ifdef __cplusplus
}
Modified: trunk/reactos/lib/pseh/framebased-gcchack.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/pseh/framebased-gcchac…
==============================================================================
--- trunk/reactos/lib/pseh/framebased-gcchack.c [iso-8859-1] (original)
+++ trunk/reactos/lib/pseh/framebased-gcchack.c [iso-8859-1] Wed Nov 12 14:39:18 2008
@@ -28,6 +28,8 @@
#include <pseh/pseh2.h>
#include <excpt.h>
+
+extern _SEHRegistration_t * __cdecl _SEH2CurrentRegistration(void);
extern int __SEH2Except(void *, void *, void *);
extern void __SEH2Finally(void *, void *);
@@ -156,4 +158,11 @@
);
}
+extern
+void __cdecl _SEH2Return(void)
+{
+ _SEH2LocalUnwind(CONTAINING_RECORD(_SEH2CurrentRegistration(), _SEHFrame_t,
SF_Registration), NULL);
+ _SEH2LeaveFrame();
+}
+
/* EOF */
Modified: trunk/reactos/lib/pseh/i386/framebased-gcchack.S
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/pseh/i386/framebased-g…
==============================================================================
--- trunk/reactos/lib/pseh/i386/framebased-gcchack.S [iso-8859-1] (original)
+++ trunk/reactos/lib/pseh/i386/framebased-gcchack.S [iso-8859-1] Wed Nov 12 14:39:18
2008
@@ -20,6 +20,11 @@
.text
.intel_syntax noprefix
+
+.globl __SEH2CurrentRegistration
+__SEH2CurrentRegistration:
+ mov eax, [fs:0]
+ ret
.globl ___SEH2Except
___SEH2Except: