Ignore:
Timestamp:
Mar 31, 2017, 12:24:39 PM (7 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
5ea06d6
Parents:
72dc82a (diff), 077810d (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 branches 'master' and 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/assert.c

    r72dc82a r78d3dd5  
    1717#include "stdlib"                                                                               // abort
    1818
     19#include "libhdr/libdebug.h"
     20
    1921extern "C" {
    2022        #include <stdarg.h>                                                             // varargs
     
    2325        extern const char * __progname;                                         // global name of running executable (argv[0])
    2426
    25         #define CFA_ASSERT_FMT "*CFA assertion error* from program \"%s\" in \"%s\" at line %d in file \"%s\""
     27        #define CFA_ASSERT_FMT "Cforall Assertion error from program \"%s\" in \"%s\" at line %d in file \"%s\""
    2628
    2729        // called by macro assert in assert.h
    2830        void __assert_fail( const char *assertion, const char *file, unsigned int line, const char *function ) {
    29                 fprintf( stderr, CFA_ASSERT_FMT ".\n", __progname, function, line, file );
     31                __lib_debug_print_safe( CFA_ASSERT_FMT ".\n", __progname, function, line, file );
    3032                abort();
    3133        }
     
    3335        // called by macro assertf
    3436        void __assert_fail_f( const char *assertion, const char *file, unsigned int line, const char *function, const char *fmt, ... ) {
    35                 fprintf( stderr, CFA_ASSERT_FMT ": ", __progname, function, line, file );
     37                __lib_debug_acquire();
     38                __lib_debug_print_nolock( CFA_ASSERT_FMT ": ", __progname, function, line, file );
     39
    3640                va_list args;
    3741                va_start( args, fmt );
    38                 vfprintf( stderr, fmt, args );
     42                __lib_debug_print_vararg( fmt, args );
    3943                va_end( args );
    40                 fprintf( stderr, "\n" );
     44
     45                __lib_debug_print_nolock( "\n" );
     46                __lib_debug_release();
    4147                abort();
    4248        }
Note: See TracChangeset for help on using the changeset viewer.