Changeset 4fa44e7 for libcfa


Ignore:
Timestamp:
May 12, 2020, 1:59:33 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
1b143de
Parents:
504a7dc (diff), 730f4f1 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into relaxed_ready

Location:
libcfa
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • libcfa/Makefile.in

    r504a7dc r4fa44e7  
    253253DEFS = @DEFS@
    254254DEPDIR = @DEPDIR@
     255DIST_BWLIMIT = @DIST_BWLIMIT@
    255256DLLTOOL = @DLLTOOL@
    256257DRIVER_DIR = @DRIVER_DIR@
  • libcfa/configure

    r504a7dc r4fa44e7  
    707707CONFIG_CFLAGS
    708708ARCH_FLAGS
     709DIST_BWLIMIT
    709710CFADIR_HASH
    710711LOCAL_CC1
     
    789790enable_silent_rules
    790791enable_distcc
     792with_bwlimit
    791793with_cfa_name
    792794enable_static
     
    14651467  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
    14661468  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
     1469  --with-bwlimit=RATE     RATE the maximum rate at which rsync will be limited when using distributed builds
    14671470  --with-cfa-name=NAME     NAME too which cfa will be installed
    14681471  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
     
    30473050
    30483051
     3052
     3053# Check whether --with-bwlimit was given.
     3054if test "${with_bwlimit+set}" = set; then :
     3055  withval=$with_bwlimit; DIST_BWLIMIT=$withval
     3056else
     3057  DIST_BWLIMIT=0
     3058fi
     3059
     3060
    30493061echo -n "checking for distributated build... "
    30503062if test x$enable_distcc = xno; then
     
    30703082  ENABLE_DISTCC_FALSE=
    30713083fi
     3084
    30723085
    30733086
  • libcfa/configure.ac

    r504a7dc r4fa44e7  
    3131        enable_distcc=$enableval, enable_distcc=no)
    3232
     33AC_ARG_WITH(bwlimit,
     34        [  --with-bwlimit=RATE     RATE the maximum rate at which rsync will be limited when using distributed builds],
     35        DIST_BWLIMIT=$withval, DIST_BWLIMIT=0)
     36
    3337echo -n "checking for distributated build... "
    3438if test x$enable_distcc = xno; then
     
    5559AC_SUBST(CFADIR_HASH)
    5660AC_SUBST(CFA_VERSION)
     61AC_SUBST(DIST_BWLIMIT)
    5762
    5863#==============================================================================
  • libcfa/prelude/Makefile.am

    r504a7dc r4fa44e7  
    7272if ENABLE_DISTCC
    7373distribution: @LOCAL_CFACC@ @LOCAL_CC1@ @CFACPP@ gcc-builtins.cf builtins.cf extras.cf prelude.cfa bootloader.c $(srcdir)/../../tools/build/push2dist.sh
    74         ${AM_V_GEN}$(srcdir)/../../tools/build/push2dist.sh @CFADIR_HASH@
     74        ${AM_V_GEN}$(srcdir)/../../tools/build/push2dist.sh @CFADIR_HASH@ @DIST_BWLIMIT@
    7575        @echo "Dummy file to track distribution to remote hosts" > ${@}
    7676
  • libcfa/prelude/Makefile.in

    r504a7dc r4fa44e7  
    215215DEFS = @DEFS@
    216216DEPDIR = @DEPDIR@
     217DIST_BWLIMIT = @DIST_BWLIMIT@
    217218DLLTOOL = @DLLTOOL@
    218219DRIVER_DIR = @DRIVER_DIR@
     
    655656
    656657@ENABLE_DISTCC_TRUE@distribution: @LOCAL_CFACC@ @LOCAL_CC1@ @CFACPP@ gcc-builtins.cf builtins.cf extras.cf prelude.cfa bootloader.c $(srcdir)/../../tools/build/push2dist.sh
    657 @ENABLE_DISTCC_TRUE@    ${AM_V_GEN}$(srcdir)/../../tools/build/push2dist.sh @CFADIR_HASH@
     658@ENABLE_DISTCC_TRUE@    ${AM_V_GEN}$(srcdir)/../../tools/build/push2dist.sh @CFADIR_HASH@ @DIST_BWLIMIT@
    658659@ENABLE_DISTCC_TRUE@    @echo "Dummy file to track distribution to remote hosts" > ${@}
    659660
  • libcfa/src/Makefile.in

    r504a7dc r4fa44e7  
    308308DEFS = @DEFS@
    309309DEPDIR = @DEPDIR@
     310DIST_BWLIMIT = @DIST_BWLIMIT@
    310311DLLTOOL = @DLLTOOL@
    311312DRIVER_DIR = @DRIVER_DIR@
  • libcfa/src/exception.c

    r504a7dc r4fa44e7  
    121121
    122122
    123 // TERMINATION ===============================================================
    124 
    125 // MEMORY MANAGEMENT (still for integers)
    126 // May have to move to cfa for constructors and destructors (references).
     123// MEMORY MANAGEMENT =========================================================
    127124
    128125// How to clean up an exception in various situations.
     
    203200}
    204201
    205 // If this isn't a rethrow (*except==0), delete the provided exception.
    206 void __cfaehm_cleanup_terminate( void * except ) {
    207         if ( *(void**)except ) __cfaehm_delete_exception( *(exception_t **)except );
    208 }
     202// CANCELLATION ==============================================================
    209203
    210204// Function needed by force unwind
     
    228222}
    229223
     224// Cancel the current stack, prefroming approprate clean-up and messaging.
     225static __attribute__((noreturn)) void __cfaehm_cancel_stack(
     226                exception_t * exception ) {
     227        // TODO: Detect current stack and pick a particular stop-function.
     228        _Unwind_Reason_Code ret;
     229        ret = _Unwind_ForcedUnwind( &this_exception_storage, _Stop_Fn, (void*)0x22 );
     230        printf("UNWIND ERROR %d after force unwind\n", ret);
     231        abort();
     232}
     233
     234
     235// TERMINATION ===============================================================
     236
     237// If this isn't a rethrow (*except==0), delete the provided exception.
     238void __cfaehm_cleanup_terminate( void * except ) {
     239        if ( *(void**)except ) __cfaehm_delete_exception( *(exception_t **)except );
     240}
     241
    230242// The exception that is being thrown must already be stored.
    231243static __attribute__((noreturn)) void __cfaehm_begin_unwind(void) {
     
    245257        // the whole stack.
    246258
     259        // No handler found, go to the default operation.
     260        // Currently this will always be a cancellation.
    247261        if ( ret == _URC_END_OF_STACK ) {
    248                 // No proper handler was found. This can be handled in many ways, C++ calls std::terminate.
    249                 // Here we force unwind the stack, basically raising a cancellation.
    250                 printf("Uncaught exception %p\n", &this_exception_storage);
    251 
    252                 ret = _Unwind_ForcedUnwind( &this_exception_storage, _Stop_Fn, (void*)0x22 );
    253                 printf("UNWIND ERROR %d after force unwind\n", ret);
    254                 abort();
     262                __cfadbg_print_safe(exception, "Uncaught exception %p\n", &this_exception_storage);
     263
     264                __cfaehm_cancel_stack(this_exception_context()->current_exception);
    255265        }
    256266
Note: See TracChangeset for help on using the changeset viewer.