source: libcfa/src/concurrency/exception.hfa @ 342be43

ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change on this file since 342be43 was 342be43, checked in by Andrew Beach <ajbeach@…>, 3 years ago

Some exception clean-up that did not require any drastic changes.

  • Property mode set to 100644
File size: 1.2 KB
Line 
1//
2// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
3//
4// The contents of this file are covered under the licence agreement in the
5// file "LICENCE" distributed with Cforall.
6//
7// exception.hfa -- Exceptions in a concurrent environment.
8//
9// Author           : Andrew Beach
10// Created On       : Mon Aug 24 10:41:00 2020
11// Last Modified By : Andrew Beach
12// Last Modified On : Mon Aug 24 14:27:00 2020
13// Update Count     : 0
14//
15
16#pragma once
17
18// This is an internal bridge between the two modes and must be C compatable.
19
20#include "bits/defs.hfa"
21#include "invoke.h"
22
23#ifdef __cforall
24extern "C" {
25
26#define HIDE_EXPORTS
27#endif
28#include "unwind.h"
29
30struct exception_context_t * this_exception_context(void) OPTIONAL_THREAD;
31
32_Unwind_Reason_Code __cfaehm_cancellation_unwind(
33                struct _Unwind_Exception * unwind_exception ) OPTIONAL_THREAD;
34
35struct __cfaehm_node {
36        struct _Unwind_Exception unwind_exception;
37        struct __cfaehm_node * next;
38        int handler_index;
39};
40
41static inline exception_t * __cfaehm_cancellation_exception(
42                struct _Unwind_Exception * unwind_exception ) {
43        return (exception_t *)(1 + (struct __cfaehm_node *)unwind_exception);
44}
45
46#ifdef __cforall
47#undef HIDE_EXPORTS
48}
49#endif
Note: See TracBrowser for help on using the repository browser.