+_abnormal_termination()
authorshort <>
Thu, 7 Nov 2002 17:01:43 +0000 (17:01 +0000)
committershort <>
Thu, 7 Nov 2002 17:01:43 +0000 (17:01 +0000)
src/libcaptive/ps/signal.c

index bc8a16e..9ced3b0 100644 (file)
 #include "reactos/internal/mm.h"  /* for PAGE_SIZE */
 
 
-static greg_t val_exceptionstack_top;
+static greg_t val_exceptionstack_top=0;
+
+
+
+/**
+ * _abnormal_termination:
+ *
+ * This call can be also accessed as AbnormalTermination() or abnormal_termination().
+ *
+ * Returns whether some exception occured (FIXME: in what scope?).
+ * Exception handlers are registered from W32 binary in stack frames stored in "fs:[0x00000000]"
+ * value which gets mapped by libcaptive/ps/signal.c to #val_exceptionstack_top
+ * variable.
+ *
+ * libcaptive currently does not raise any exceptions therefore this call always returns value %0.
+ * See RtlpDispatchException().
+ *
+ * Returns: non-zero if some exception is now registered and pending.
+ */
+int _abnormal_termination(void)
+{
+       return 0;
+}
+
+
+/**
+ * RtlpDispatchException:
+ * @ExceptionRecord: Ignored by libcaptive.
+ * @Context: Ignored by libcaptive.
+ *
+ * Function definition to prevent inclusion of real RtlpDispatchException() implementation.
+ * Currently libcaptive never raises any exception - fix _abnormal_termination() if it changes.
+ *
+ * Returns: Never returns. Value %0 if it returns although it is impossible.
+ */
+ULONG RtlpDispatchException(IN PEXCEPTION_RECORD ExceptionRecord,IN PCONTEXT Context)
+{
+       g_assert_not_reached();
+       g_return_val_if_reached(0);
+}
+
 
 static gboolean instr_mov_greg_to_fsmem(int greg,const void *fsmem,struct ucontext *ucontext)
 {