X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=mware%2Fexcept.h;h=5229f3f5f23eafbd407173ea15a26e926e689a57;hb=6ec920da09a91594581c6d1a8931e72792b73525;hp=af4c06445c534ac580c15bb0d63759a78e7ed12e;hpb=7c03b1e47ddefae9577cfe0d2dd3f6fff83b57ec;p=bertos.git diff --git a/mware/except.h b/mware/except.h index af4c0644..5229f3f5 100755 --- a/mware/except.h +++ b/mware/except.h @@ -32,15 +32,9 @@ extern jmp_buf except_stack[EXCEPT_CONTEXTS]; extern int except_top; -#ifdef _DEBUG -# define PUSH_EXCEPT ASSERT(except_top < EXCEPT_CONTEXTS), setjmp(except_stack[except_top++])) -# define POP_EXCEPT (ASSERT(except_top > 0), --except_top) -# define DO_EXCEPT (ASSERT(except_top > 0), longjmp(except_stack[--except_top], true)) -#else -# define PUSH_EXCEPT (setjmp(except_stack[except_top++])) -# define POP_EXCEPT (--except_top) -# define DO_EXCEPT (longjmp(except_stack[--except_top], true)) -#endif +#define PUSH_EXCEPT (ASSERT(except_top < EXCEPT_CONTEXTS), setjmp(except_stack[except_top++])) +#define POP_EXCEPT (ASSERT(except_top > 0), --except_top) +#define DO_EXCEPT (ASSERT(except_top > 0), longjmp(except_stack[--except_top], true)) /** * Jump buffer to use when throwing an exception or aborting an operation