Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/exception.c

    rf1b6671 r73530d9  
    1010// Created On       : Mon Jun 26 15:13:00 2017
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Mon Apr 06 14:40:00 2020
    13 // Update Count     : 15
     12// Last Modified On : Fri Apr 03 11:57:00 2020
     13// Update Count     : 14
    1414//
    1515
     
    7575// RESUMPTION ================================================================
    7676
    77 static void reset_top_resume(struct __cfaehm_try_resume_node ** store) {
    78         this_exception_context()->top_resume = *store;
    79 }
    80 
    8177void __cfaehm_throw_resume(exception_t * except) {
    8278        struct exception_context_t * context = this_exception_context();
     
    8480        __cfaabi_dbg_print_safe("Throwing resumption exception\n");
    8581
    86         __attribute__((cleanup(reset_top_resume)))
    8782        struct __cfaehm_try_resume_node * original_head = context->top_resume;
    8883        struct __cfaehm_try_resume_node * current = context->top_resume;
     
    9186                context->top_resume = current->next;
    9287                if (current->handler(except)) {
     88                        context->top_resume = original_head;
    9389                        return;
    9490                }
     
    9692
    9793        __cfaabi_dbg_print_safe("Unhandled exception\n");
     94        context->top_resume = original_head;
    9895
    9996        // Fall back to termination:
Note: See TracChangeset for help on using the changeset viewer.