// Trying to create the new secret header for the exception handling mechanism. // This will have to go in the public header later. typedef int exception; // These might be given simpler names and made public. void __throw_terminate(exception except) __attribute__((noreturn)); void __throw_resume(exception except); void __try_terminate(void (*try_block)(), void (*catch_block)(int index, exception except), int (*match_block)(exception except)); struct __try_resume_node { struct __try_resume_node * next; _Bool (*try_to_handle)(exception except); }; struct __cleanup_hook {}; // When I have it working in a single threaded environment. struct shared_stack_t { //struct lock lock; struct __try_resume_node * top_resume; struct __try_resume_node * current_resume; exception current_exception; int current_handler_index; }; extern struct shared_stack_t shared_stack;