Ignore:
Timestamp:
Oct 28, 2020, 3:40:46 PM (3 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
936d95c
Parents:
1be1e5a
Message:

Attempt to clean-up the exception headers. I think this is easier to follow.

Location:
libcfa/src/concurrency
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/coroutine.cfa

    r1be1e5a rc960331  
    2424#include <unistd.h>
    2525#include <sys/mman.h>                                                                   // mprotect
    26 extern "C" {
    27 // use this define to make unwind.h play nice, definitely a hack
    28 #define HIDE_EXPORTS
    2926#include <unwind.h>
    30 #undef HIDE_EXPORTS
    31 }
    3227
    3328#include "kernel_private.hfa"
     29#include "exception.hfa"
    3430
    3531#define __CFA_INVOKE_PRIVATE__
  • libcfa/src/concurrency/exception.cfa

    r1be1e5a rc960331  
    1010// Created On       : Mon Aug 17 10:41:00 2020
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Tue Aug 25 14:41:00 2020
    13 // Update Count     : 0
     12// Last Modified On : Wed Oct 28 14:34:00 2020
     13// Update Count     : 1
    1414//
    1515
    16 extern "C" {
    17 // use this define to make unwind.h play nice, definitely a hack
    18 #define HIDE_EXPORTS
    19 #include <unwind.h>
    20 #undef HIDE_EXPORTS
     16#define __cforall_thread__
    2117
    22 extern void __cfactx_thrd_leave();
    23 }
     18#include "exception.hfa"
    2419
    25 #include "invoke.h"
    26 #include "exception.hfa"
    2720#include "coroutine.hfa"
    2821
    2922extern struct $thread * mainThread;
     23extern "C" {
     24extern void __cfactx_thrd_leave();
     25}
    3026
    3127// Common pattern for all the stop functions, wait until the end then act.
  • libcfa/src/concurrency/exception.hfa

    r1be1e5a rc960331  
    1818// This is an internal bridge between the two modes and must be C compatable.
    1919
     20#include <unwind.h>
    2021#include "bits/defs.hfa"
    2122#include "invoke.h"
     23#include "exception.h"
    2224
    2325#ifdef __cforall
    2426extern "C" {
    25 
    26 #define HIDE_EXPORTS
    2727#endif
    28 #include "unwind.h"
    2928
    3029struct exception_context_t * this_exception_context(void) OPTIONAL_THREAD;
     
    3332                struct _Unwind_Exception * unwind_exception ) OPTIONAL_THREAD;
    3433
    35 struct __cfaehm_node {
    36         struct _Unwind_Exception unwind_exception;
    37         struct __cfaehm_node * next;
    38         int handler_index;
    39 };
    40 
    41 static inline exception_t * __cfaehm_cancellation_exception(
    42                 struct _Unwind_Exception * unwind_exception ) {
    43         return (exception_t *)(1 + (struct __cfaehm_node *)unwind_exception);
    44 }
    45 
    4634#ifdef __cforall
    47 #undef HIDE_EXPORTS
    4835}
    4936#endif
Note: See TracChangeset for help on using the changeset viewer.