Changes in / [077810d:936a287]


Ignore:
Location:
src
Files:
4 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • src/driver/cfa.cc

    r077810d r936a287  
    269269                args[nargs] = "-lpthread";
    270270                nargs += 1;
    271                 args[nargs] = "-ldl";
    272                 nargs += 1;
    273                 args[nargs] = "-Xlinker";
    274                 nargs += 1;
    275                 args[nargs] = "--undefined=__lib_debug_write";
    276                 nargs += 1;
    277 
    278271        } // if
    279272#endif //HAVE_LIBCFA
  • src/libcfa/Makefile.am

    r077810d r936a287  
    4949
    5050libobjs = ${headers:=.o}
    51 libsrc = libcfa-prelude.c interpose.c libhdr/debug.c ${headers:=.c}
     51libsrc = libcfa-prelude.c ${headers:=.c}
    5252
    5353# not all platforms support concurrency, add option do disable it
  • src/libcfa/Makefile.in

    r077810d r936a287  
    4343
    4444# not all platforms support concurrency, add option do disable it
    45 @BUILD_CONCURRENCY_TRUE@am__append_3 = concurrency/coroutine concurrency/thread concurrency/kernel concurrency/monitor
     45@BUILD_CONCURRENCY_TRUE@am__append_3 = containers/vector concurrency/coroutine concurrency/thread concurrency/kernel concurrency/monitor
    4646
    4747# not all platforms support concurrency, add option do disable it
     
    9797libcfa_d_a_AR = $(AR) $(ARFLAGS)
    9898libcfa_d_a_LIBADD =
    99 am__libcfa_d_a_SOURCES_DIST = libcfa-prelude.c interpose.c \
    100         libhdr/debug.c limits.c stdlib.c math.c iostream.c fstream.c \
    101         iterator.c rational.c assert.c containers/vector.c \
    102         concurrency/coroutine.c concurrency/thread.c \
    103         concurrency/kernel.c concurrency/monitor.c \
    104         concurrency/CtxSwitch-@MACHINE_TYPE@.S concurrency/invoke.c
     99am__libcfa_d_a_SOURCES_DIST = libcfa-prelude.c limits.c stdlib.c \
     100        math.c iostream.c fstream.c iterator.c rational.c assert.c \
     101        containers/vector.c concurrency/coroutine.c \
     102        concurrency/thread.c concurrency/kernel.c \
     103        concurrency/monitor.c concurrency/CtxSwitch-@MACHINE_TYPE@.S \
     104        concurrency/invoke.c
    105105am__dirstamp = $(am__leading_dot)dirstamp
    106 @BUILD_CONCURRENCY_TRUE@am__objects_1 = concurrency/libcfa_d_a-coroutine.$(OBJEXT) \
     106@BUILD_CONCURRENCY_TRUE@am__objects_1 = containers/libcfa_d_a-vector.$(OBJEXT) \
     107@BUILD_CONCURRENCY_TRUE@        concurrency/libcfa_d_a-coroutine.$(OBJEXT) \
    107108@BUILD_CONCURRENCY_TRUE@        concurrency/libcfa_d_a-thread.$(OBJEXT) \
    108109@BUILD_CONCURRENCY_TRUE@        concurrency/libcfa_d_a-kernel.$(OBJEXT) \
     
    112113        libcfa_d_a-iostream.$(OBJEXT) libcfa_d_a-fstream.$(OBJEXT) \
    113114        libcfa_d_a-iterator.$(OBJEXT) libcfa_d_a-rational.$(OBJEXT) \
    114         libcfa_d_a-assert.$(OBJEXT) \
    115         containers/libcfa_d_a-vector.$(OBJEXT) $(am__objects_1)
     115        libcfa_d_a-assert.$(OBJEXT) $(am__objects_1)
    116116@BUILD_CONCURRENCY_TRUE@am__objects_3 = concurrency/CtxSwitch-@MACHINE_TYPE@.$(OBJEXT) \
    117117@BUILD_CONCURRENCY_TRUE@        concurrency/libcfa_d_a-invoke.$(OBJEXT)
    118 am__objects_4 = libcfa_d_a-libcfa-prelude.$(OBJEXT) \
    119         libcfa_d_a-interpose.$(OBJEXT) \
    120         libhdr/libcfa_d_a-debug.$(OBJEXT) $(am__objects_2) \
     118am__objects_4 = libcfa_d_a-libcfa-prelude.$(OBJEXT) $(am__objects_2) \
    121119        $(am__objects_3)
    122120am_libcfa_d_a_OBJECTS = $(am__objects_4)
     
    124122libcfa_a_AR = $(AR) $(ARFLAGS)
    125123libcfa_a_LIBADD =
    126 am__libcfa_a_SOURCES_DIST = libcfa-prelude.c interpose.c \
    127         libhdr/debug.c limits.c stdlib.c math.c iostream.c fstream.c \
    128         iterator.c rational.c assert.c containers/vector.c \
    129         concurrency/coroutine.c concurrency/thread.c \
    130         concurrency/kernel.c concurrency/monitor.c \
    131         concurrency/CtxSwitch-@MACHINE_TYPE@.S concurrency/invoke.c
    132 @BUILD_CONCURRENCY_TRUE@am__objects_5 = concurrency/libcfa_a-coroutine.$(OBJEXT) \
     124am__libcfa_a_SOURCES_DIST = libcfa-prelude.c limits.c stdlib.c math.c \
     125        iostream.c fstream.c iterator.c rational.c assert.c \
     126        containers/vector.c concurrency/coroutine.c \
     127        concurrency/thread.c concurrency/kernel.c \
     128        concurrency/monitor.c concurrency/CtxSwitch-@MACHINE_TYPE@.S \
     129        concurrency/invoke.c
     130@BUILD_CONCURRENCY_TRUE@am__objects_5 =  \
     131@BUILD_CONCURRENCY_TRUE@        containers/libcfa_a-vector.$(OBJEXT) \
     132@BUILD_CONCURRENCY_TRUE@        concurrency/libcfa_a-coroutine.$(OBJEXT) \
    133133@BUILD_CONCURRENCY_TRUE@        concurrency/libcfa_a-thread.$(OBJEXT) \
    134134@BUILD_CONCURRENCY_TRUE@        concurrency/libcfa_a-kernel.$(OBJEXT) \
     
    138138        libcfa_a-fstream.$(OBJEXT) libcfa_a-iterator.$(OBJEXT) \
    139139        libcfa_a-rational.$(OBJEXT) libcfa_a-assert.$(OBJEXT) \
    140         containers/libcfa_a-vector.$(OBJEXT) $(am__objects_5)
     140        $(am__objects_5)
    141141@BUILD_CONCURRENCY_TRUE@am__objects_7 = concurrency/CtxSwitch-@MACHINE_TYPE@.$(OBJEXT) \
    142142@BUILD_CONCURRENCY_TRUE@        concurrency/libcfa_a-invoke.$(OBJEXT)
    143 am__objects_8 = libcfa_a-libcfa-prelude.$(OBJEXT) \
    144         libcfa_a-interpose.$(OBJEXT) libhdr/libcfa_a-debug.$(OBJEXT) \
    145         $(am__objects_6) $(am__objects_7)
     143am__objects_8 = libcfa_a-libcfa-prelude.$(OBJEXT) $(am__objects_6) \
     144        $(am__objects_7)
    146145am_libcfa_a_OBJECTS = $(am__objects_8)
    147146libcfa_a_OBJECTS = $(am_libcfa_a_OBJECTS)
     
    309308AM_CCASFLAGS = @CFA_FLAGS@
    310309headers = limits stdlib math iostream fstream iterator rational assert \
    311         containers/vector $(am__append_3)
     310        $(am__append_3)
    312311libobjs = ${headers:=.o}
    313 libsrc = libcfa-prelude.c interpose.c libhdr/debug.c ${headers:=.c} \
    314         $(am__append_4)
     312libsrc = libcfa-prelude.c ${headers:=.c} $(am__append_4)
    315313libcfa_a_SOURCES = ${libsrc}
    316314libcfa_a_CFLAGS = -nodebug -O2
     
    385383clean-libLIBRARIES:
    386384        -test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
    387 libhdr/$(am__dirstamp):
    388         @$(MKDIR_P) libhdr
    389         @: > libhdr/$(am__dirstamp)
    390 libhdr/$(DEPDIR)/$(am__dirstamp):
    391         @$(MKDIR_P) libhdr/$(DEPDIR)
    392         @: > libhdr/$(DEPDIR)/$(am__dirstamp)
    393 libhdr/libcfa_d_a-debug.$(OBJEXT): libhdr/$(am__dirstamp) \
    394         libhdr/$(DEPDIR)/$(am__dirstamp)
    395385containers/$(am__dirstamp):
    396386        @$(MKDIR_P) containers
     
    425415        $(AM_V_AR)$(libcfa_d_a_AR) libcfa-d.a $(libcfa_d_a_OBJECTS) $(libcfa_d_a_LIBADD)
    426416        $(AM_V_at)$(RANLIB) libcfa-d.a
    427 libhdr/libcfa_a-debug.$(OBJEXT): libhdr/$(am__dirstamp) \
    428         libhdr/$(DEPDIR)/$(am__dirstamp)
    429417containers/libcfa_a-vector.$(OBJEXT): containers/$(am__dirstamp) \
    430418        containers/$(DEPDIR)/$(am__dirstamp)
     
    459447        -rm -f containers/libcfa_a-vector.$(OBJEXT)
    460448        -rm -f containers/libcfa_d_a-vector.$(OBJEXT)
    461         -rm -f libhdr/libcfa_a-debug.$(OBJEXT)
    462         -rm -f libhdr/libcfa_d_a-debug.$(OBJEXT)
    463449
    464450distclean-compile:
     
    467453@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_a-assert.Po@am__quote@
    468454@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_a-fstream.Po@am__quote@
    469 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_a-interpose.Po@am__quote@
    470455@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_a-iostream.Po@am__quote@
    471456@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_a-iterator.Po@am__quote@
     
    477462@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_d_a-assert.Po@am__quote@
    478463@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_d_a-fstream.Po@am__quote@
    479 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_d_a-interpose.Po@am__quote@
    480464@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_d_a-iostream.Po@am__quote@
    481465@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_d_a-iterator.Po@am__quote@
     
    498482@AMDEP_TRUE@@am__include@ @am__quote@containers/$(DEPDIR)/libcfa_a-vector.Po@am__quote@
    499483@AMDEP_TRUE@@am__include@ @am__quote@containers/$(DEPDIR)/libcfa_d_a-vector.Po@am__quote@
    500 @AMDEP_TRUE@@am__include@ @am__quote@libhdr/$(DEPDIR)/libcfa_a-debug.Po@am__quote@
    501 @AMDEP_TRUE@@am__include@ @am__quote@libhdr/$(DEPDIR)/libcfa_d_a-debug.Po@am__quote@
    502484
    503485.S.o:
     
    540522@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-libcfa-prelude.obj `if test -f 'libcfa-prelude.c'; then $(CYGPATH_W) 'libcfa-prelude.c'; else $(CYGPATH_W) '$(srcdir)/libcfa-prelude.c'; fi`
    541523
    542 libcfa_d_a-interpose.o: interpose.c
    543 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-interpose.o -MD -MP -MF $(DEPDIR)/libcfa_d_a-interpose.Tpo -c -o libcfa_d_a-interpose.o `test -f 'interpose.c' || echo '$(srcdir)/'`interpose.c
    544 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-interpose.Tpo $(DEPDIR)/libcfa_d_a-interpose.Po
    545 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='interpose.c' object='libcfa_d_a-interpose.o' libtool=no @AMDEPBACKSLASH@
    546 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    547 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-interpose.o `test -f 'interpose.c' || echo '$(srcdir)/'`interpose.c
    548 
    549 libcfa_d_a-interpose.obj: interpose.c
    550 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-interpose.obj -MD -MP -MF $(DEPDIR)/libcfa_d_a-interpose.Tpo -c -o libcfa_d_a-interpose.obj `if test -f 'interpose.c'; then $(CYGPATH_W) 'interpose.c'; else $(CYGPATH_W) '$(srcdir)/interpose.c'; fi`
    551 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-interpose.Tpo $(DEPDIR)/libcfa_d_a-interpose.Po
    552 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='interpose.c' object='libcfa_d_a-interpose.obj' libtool=no @AMDEPBACKSLASH@
    553 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    554 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-interpose.obj `if test -f 'interpose.c'; then $(CYGPATH_W) 'interpose.c'; else $(CYGPATH_W) '$(srcdir)/interpose.c'; fi`
    555 
    556 libhdr/libcfa_d_a-debug.o: libhdr/debug.c
    557 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libhdr/libcfa_d_a-debug.o -MD -MP -MF libhdr/$(DEPDIR)/libcfa_d_a-debug.Tpo -c -o libhdr/libcfa_d_a-debug.o `test -f 'libhdr/debug.c' || echo '$(srcdir)/'`libhdr/debug.c
    558 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) libhdr/$(DEPDIR)/libcfa_d_a-debug.Tpo libhdr/$(DEPDIR)/libcfa_d_a-debug.Po
    559 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='libhdr/debug.c' object='libhdr/libcfa_d_a-debug.o' libtool=no @AMDEPBACKSLASH@
    560 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    561 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libhdr/libcfa_d_a-debug.o `test -f 'libhdr/debug.c' || echo '$(srcdir)/'`libhdr/debug.c
    562 
    563 libhdr/libcfa_d_a-debug.obj: libhdr/debug.c
    564 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libhdr/libcfa_d_a-debug.obj -MD -MP -MF libhdr/$(DEPDIR)/libcfa_d_a-debug.Tpo -c -o libhdr/libcfa_d_a-debug.obj `if test -f 'libhdr/debug.c'; then $(CYGPATH_W) 'libhdr/debug.c'; else $(CYGPATH_W) '$(srcdir)/libhdr/debug.c'; fi`
    565 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) libhdr/$(DEPDIR)/libcfa_d_a-debug.Tpo libhdr/$(DEPDIR)/libcfa_d_a-debug.Po
    566 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='libhdr/debug.c' object='libhdr/libcfa_d_a-debug.obj' libtool=no @AMDEPBACKSLASH@
    567 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    568 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libhdr/libcfa_d_a-debug.obj `if test -f 'libhdr/debug.c'; then $(CYGPATH_W) 'libhdr/debug.c'; else $(CYGPATH_W) '$(srcdir)/libhdr/debug.c'; fi`
    569 
    570524libcfa_d_a-limits.o: limits.c
    571525@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-limits.o -MD -MP -MF $(DEPDIR)/libcfa_d_a-limits.Tpo -c -o libcfa_d_a-limits.o `test -f 'limits.c' || echo '$(srcdir)/'`limits.c
     
    763717@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    764718@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-libcfa-prelude.obj `if test -f 'libcfa-prelude.c'; then $(CYGPATH_W) 'libcfa-prelude.c'; else $(CYGPATH_W) '$(srcdir)/libcfa-prelude.c'; fi`
    765 
    766 libcfa_a-interpose.o: interpose.c
    767 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-interpose.o -MD -MP -MF $(DEPDIR)/libcfa_a-interpose.Tpo -c -o libcfa_a-interpose.o `test -f 'interpose.c' || echo '$(srcdir)/'`interpose.c
    768 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-interpose.Tpo $(DEPDIR)/libcfa_a-interpose.Po
    769 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='interpose.c' object='libcfa_a-interpose.o' libtool=no @AMDEPBACKSLASH@
    770 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    771 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-interpose.o `test -f 'interpose.c' || echo '$(srcdir)/'`interpose.c
    772 
    773 libcfa_a-interpose.obj: interpose.c
    774 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-interpose.obj -MD -MP -MF $(DEPDIR)/libcfa_a-interpose.Tpo -c -o libcfa_a-interpose.obj `if test -f 'interpose.c'; then $(CYGPATH_W) 'interpose.c'; else $(CYGPATH_W) '$(srcdir)/interpose.c'; fi`
    775 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-interpose.Tpo $(DEPDIR)/libcfa_a-interpose.Po
    776 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='interpose.c' object='libcfa_a-interpose.obj' libtool=no @AMDEPBACKSLASH@
    777 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    778 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-interpose.obj `if test -f 'interpose.c'; then $(CYGPATH_W) 'interpose.c'; else $(CYGPATH_W) '$(srcdir)/interpose.c'; fi`
    779 
    780 libhdr/libcfa_a-debug.o: libhdr/debug.c
    781 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libhdr/libcfa_a-debug.o -MD -MP -MF libhdr/$(DEPDIR)/libcfa_a-debug.Tpo -c -o libhdr/libcfa_a-debug.o `test -f 'libhdr/debug.c' || echo '$(srcdir)/'`libhdr/debug.c
    782 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) libhdr/$(DEPDIR)/libcfa_a-debug.Tpo libhdr/$(DEPDIR)/libcfa_a-debug.Po
    783 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='libhdr/debug.c' object='libhdr/libcfa_a-debug.o' libtool=no @AMDEPBACKSLASH@
    784 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    785 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libhdr/libcfa_a-debug.o `test -f 'libhdr/debug.c' || echo '$(srcdir)/'`libhdr/debug.c
    786 
    787 libhdr/libcfa_a-debug.obj: libhdr/debug.c
    788 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libhdr/libcfa_a-debug.obj -MD -MP -MF libhdr/$(DEPDIR)/libcfa_a-debug.Tpo -c -o libhdr/libcfa_a-debug.obj `if test -f 'libhdr/debug.c'; then $(CYGPATH_W) 'libhdr/debug.c'; else $(CYGPATH_W) '$(srcdir)/libhdr/debug.c'; fi`
    789 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) libhdr/$(DEPDIR)/libcfa_a-debug.Tpo libhdr/$(DEPDIR)/libcfa_a-debug.Po
    790 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='libhdr/debug.c' object='libhdr/libcfa_a-debug.obj' libtool=no @AMDEPBACKSLASH@
    791 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    792 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libhdr/libcfa_a-debug.obj `if test -f 'libhdr/debug.c'; then $(CYGPATH_W) 'libhdr/debug.c'; else $(CYGPATH_W) '$(srcdir)/libhdr/debug.c'; fi`
    793719
    794720libcfa_a-limits.o: limits.c
     
    11221048        -rm -f containers/$(DEPDIR)/$(am__dirstamp)
    11231049        -rm -f containers/$(am__dirstamp)
    1124         -rm -f libhdr/$(DEPDIR)/$(am__dirstamp)
    1125         -rm -f libhdr/$(am__dirstamp)
    11261050
    11271051maintainer-clean-generic:
     
    11331057
    11341058distclean: distclean-am
    1135         -rm -rf ./$(DEPDIR) concurrency/$(DEPDIR) containers/$(DEPDIR) libhdr/$(DEPDIR)
     1059        -rm -rf ./$(DEPDIR) concurrency/$(DEPDIR) containers/$(DEPDIR)
    11361060        -rm -f Makefile
    11371061distclean-am: clean-am distclean-compile distclean-generic \
     
    11791103
    11801104maintainer-clean: maintainer-clean-am
    1181         -rm -rf ./$(DEPDIR) concurrency/$(DEPDIR) containers/$(DEPDIR) libhdr/$(DEPDIR)
     1105        -rm -rf ./$(DEPDIR) concurrency/$(DEPDIR) containers/$(DEPDIR)
    11821106        -rm -f Makefile
    11831107maintainer-clean-am: distclean-am maintainer-clean-generic \
  • src/libcfa/assert.c

    r077810d r936a287  
    1717#include "stdlib"                                                                               // abort
    1818
    19 #include "libhdr/libdebug.h"
    20 
    2119extern "C" {
    2220        #include <stdarg.h>                                                             // varargs
     
    2523        extern const char * __progname;                                         // global name of running executable (argv[0])
    2624
    27         #define CFA_ASSERT_FMT "Cforall Assertion error from program \"%s\" in \"%s\" at line %d in file \"%s\""
     25        #define CFA_ASSERT_FMT "*CFA assertion error* from program \"%s\" in \"%s\" at line %d in file \"%s\""
    2826
    2927        // called by macro assert in assert.h
    3028        void __assert_fail( const char *assertion, const char *file, unsigned int line, const char *function ) {
    31                 __lib_debug_print_safe( CFA_ASSERT_FMT ".\n", __progname, function, line, file );
     29                fprintf( stderr, CFA_ASSERT_FMT ".\n", __progname, function, line, file );
    3230                abort();
    3331        }
     
    3533        // called by macro assertf
    3634        void __assert_fail_f( const char *assertion, const char *file, unsigned int line, const char *function, const char *fmt, ... ) {
    37                 __lib_debug_acquire();
    38                 __lib_debug_print_nolock( CFA_ASSERT_FMT ": ", __progname, function, line, file );
    39 
     35                fprintf( stderr, CFA_ASSERT_FMT ": ", __progname, function, line, file );
    4036                va_list args;
    4137                va_start( args, fmt );
    42                 __lib_debug_print_vararg( fmt, args );
     38                vfprintf( stderr, fmt, args );
    4339                va_end( args );
    44 
    45                 __lib_debug_print_nolock( "\n" );
    46                 __lib_debug_release();
     40                fprintf( stderr, "\n" );
    4741                abort();
    4842        }
  • src/libcfa/concurrency/kernel.c

    r077810d r936a287  
    1515//
    1616
    17 #include "startup.h"
    18 
    1917//Start and stop routine for the kernel, declared first to make sure they run first
    20 void kernel_startup(void)  __attribute__(( constructor( STARTUP_PRIORITY_KERNEL ) ));
    21 void kernel_shutdown(void) __attribute__(( destructor ( STARTUP_PRIORITY_KERNEL ) ));
     18void kernel_startup(void)  __attribute__((constructor(101)));
     19void kernel_shutdown(void) __attribute__((destructor(101)));
    2220
    2321//Header
     
    2725#include <stddef.h>
    2826extern "C" {
    29 #include <stdio.h>
    3027#include <fenv.h>
    3128#include <sys/resource.h>
    32 #include <signal.h>
    33 #include <unistd.h>
    3429}
    3530
     
    151146
    152147        this->runner = runner;
    153         LIB_DEBUG_PRINT_SAFE("Kernel : constructing processor context %p\n", runner);
     148        LIB_DEBUG_PRINTF("Kernel : constructing processor context %p\n", runner);
    154149        runner{ this };
    155150}
     
    157152void ^?{}(processor * this) {
    158153        if( ! this->is_terminated ) {
    159                 LIB_DEBUG_PRINT_SAFE("Kernel : core %p signaling termination\n", this);
     154                LIB_DEBUG_PRINTF("Kernel : core %p signaling termination\n", this);
    160155                this->is_terminated = true;
    161156                wait( &this->terminated );
     
    178173void main(processorCtx_t * runner) {
    179174        processor * this = runner->proc;
    180         LIB_DEBUG_PRINT_SAFE("Kernel : core %p starting\n", this);
     175        LIB_DEBUG_PRINTF("Kernel : core %p starting\n", this);
    181176
    182177        thread_desc * readyThread = NULL;
     
    200195        }
    201196
    202         LIB_DEBUG_PRINT_SAFE("Kernel : core %p unlocking thread\n", this);
     197        LIB_DEBUG_PRINTF("Kernel : core %p unlocking thread\n", this);
    203198        signal( &this->terminated );
    204         LIB_DEBUG_PRINT_SAFE("Kernel : core %p terminated\n", this);
     199        LIB_DEBUG_PRINTF("Kernel : core %p terminated\n", this);
    205200}
    206201
     
    260255        processorCtx_t proc_cor_storage = { proc, &info };
    261256
    262         LIB_DEBUG_PRINT_SAFE("Coroutine : created stack %p\n", proc_cor_storage.__cor.stack.base);
     257        LIB_DEBUG_PRINTF("Coroutine : created stack %p\n", proc_cor_storage.__cor.stack.base);
    263258
    264259        //Set global state
     
    267262
    268263        //We now have a proper context from which to schedule threads
    269         LIB_DEBUG_PRINT_SAFE("Kernel : core %p created (%p, %p)\n", proc, proc->runner, &ctx);
     264        LIB_DEBUG_PRINTF("Kernel : core %p created (%p, %p)\n", proc, proc->runner, &ctx);
    270265
    271266        // SKULLDUGGERY: Since the coroutine doesn't have its own stack, we can't
     
    278273
    279274        // Main routine of the core returned, the core is now fully terminated
    280         LIB_DEBUG_PRINT_SAFE("Kernel : core %p main ended (%p)\n", proc, proc->runner);
     275        LIB_DEBUG_PRINTF("Kernel : core %p main ended (%p)\n", proc, proc->runner);     
    281276
    282277        return NULL;
     
    284279
    285280void start(processor * this) {
    286         LIB_DEBUG_PRINT_SAFE("Kernel : Starting core %p\n", this);
     281        LIB_DEBUG_PRINTF("Kernel : Starting core %p\n", this);
    287282       
    288283        // pthread_attr_t attributes;
     
    293288        // pthread_attr_destroy( &attributes );
    294289
    295         LIB_DEBUG_PRINT_SAFE("Kernel : core %p started\n", this);       
     290        LIB_DEBUG_PRINTF("Kernel : core %p started\n", this);   
    296291}
    297292
     
    339334// Kernel boot procedures
    340335void kernel_startup(void) {
    341         LIB_DEBUG_PRINT_SAFE("Kernel : Starting\n");   
     336        LIB_DEBUG_PRINTF("Kernel : Starting\n");       
    342337
    343338        // Start by initializing the main thread
     
    374369
    375370        // THE SYSTEM IS NOW COMPLETELY RUNNING
    376         LIB_DEBUG_PRINT_SAFE("Kernel : Started\n--------------------------------------------------\n\n");
     371        LIB_DEBUG_PRINTF("Kernel : Started\n--------------------------------------------------\n\n");
    377372}
    378373
    379374void kernel_shutdown(void) {
    380         LIB_DEBUG_PRINT_SAFE("\n--------------------------------------------------\nKernel : Shutting down\n");
     375        LIB_DEBUG_PRINTF("\n--------------------------------------------------\nKernel : Shutting down\n");
    381376
    382377        // SKULLDUGGERY: Notify the systemProcessor it needs to terminates.
     
    397392        ^(mainThread){};
    398393
    399         LIB_DEBUG_PRINT_SAFE("Kernel : Shutdown complete\n");   
    400 }
    401 
    402 static spinlock kernel_abort_lock;
    403 static spinlock kernel_debug_lock;
    404 static bool kernel_abort_called = false;
    405 
    406 void * kernel_abort    (void) __attribute__ ((__nothrow__)) {
    407         // abort cannot be recursively entered by the same or different processors because all signal handlers return when
    408         // the globalAbort flag is true.
    409         lock( &kernel_abort_lock );
    410 
    411         // first task to abort ?
    412         if ( !kernel_abort_called ) {                   // not first task to abort ?
    413                 kernel_abort_called = true;
    414                 unlock( &kernel_abort_lock );
    415         }
    416         else {
    417                 unlock( &kernel_abort_lock );
    418                
    419                 sigset_t mask;
    420                 sigemptyset( &mask );
    421                 sigaddset( &mask, SIGALRM );                    // block SIGALRM signals
    422                 sigaddset( &mask, SIGUSR1 );                    // block SIGUSR1 signals
    423                 sigsuspend( &mask );                            // block the processor to prevent further damage during abort
    424                 _exit( EXIT_FAILURE );                          // if processor unblocks before it is killed, terminate it             
    425         }
    426 
    427         return this_thread();
    428 }
    429 
    430 void kernel_abort_msg( void * kernel_data, char * abort_text, int abort_text_size ) {
    431         thread_desc * thrd = kernel_data;
    432 
    433         int len = snprintf( abort_text, abort_text_size, "Error occurred while executing task %.256s (%p)", thrd->cor.name, thrd );
    434         __lib_debug_write( STDERR_FILENO, abort_text, len );
    435 
    436         if ( thrd != this_coroutine() ) {
    437                 len = snprintf( abort_text, abort_text_size, " in coroutine %.256s (%p).\n", this_coroutine()->name, this_coroutine() );
    438                 __lib_debug_write( STDERR_FILENO, abort_text, len );
    439         }
    440         else {
    441                 __lib_debug_write( STDERR_FILENO, ".\n", 2 );
    442         }
    443 }
    444 
    445 extern "C" {
    446         void __lib_debug_acquire() {
    447                 lock(&kernel_debug_lock);
    448         }
    449 
    450         void __lib_debug_release() {
    451                 unlock(&kernel_debug_lock);
    452         }
     394        LIB_DEBUG_PRINTF("Kernel : Shutdown complete\n");       
    453395}
    454396
  • src/libcfa/concurrency/thread.c

    r077810d r936a287  
    7171        this_processor->current_coroutine = thrd_c;
    7272
    73         LIB_DEBUG_PRINT_SAFE("Thread start : %p (t %p, c %p)\n", this, thrd_c, thrd_h);
     73        LIB_DEBUG_PRINTF("Thread start : %p (t %p, c %p)\n", this, thrd_c, thrd_h);
    7474
    7575        create_stack(&thrd_c->stack, thrd_c->stack.size);
  • src/libcfa/libhdr/libdebug.h

    r077810d r936a287  
    2525#endif
    2626
    27 #ifdef __cforall
    28 extern "C" {
    29 #endif
    30       #include <stdarg.h>
    31 
    32       extern void __lib_debug_write( int fd, const char *buffer, int len );
    33       extern void __lib_debug_acquire();
    34       extern void __lib_debug_release();
    35       extern void __lib_debug_print_safe  ( const char fmt[], ... ) __attribute__(( format (printf, 1, 2) ));
    36       extern void __lib_debug_print_nolock( const char fmt[], ... ) __attribute__(( format (printf, 1, 2) ));
    37       extern void __lib_debug_print_vararg( const char fmt[], va_list arg );
    38       extern void __lib_debug_print_buffer( char buffer[], int buffer_size, const char fmt[], ... ) __attribute__(( format (printf, 3, 4) ));
    39 #ifdef __cforall
    40 }
    41 #endif
    42 
    4327#ifdef __CFA_DEBUG_PRINT__
    44       #define LIB_DEBUG_WRITE( fd, buffer, len )  __lib_debug_write( fd, buffer, len )
    45       #define LIB_DEBUG_ACQUIRE()                 __lib_debug_acquire()
    46       #define LIB_DEBUG_RELEASE()                 __lib_debug_release()
    47       #define LIB_DEBUG_PRINT_SAFE(...)           __lib_debug_print_safe   (__VA_ARGS__)
    48       #define LIB_DEBUG_PRINT_NOLOCK(...)         __lib_debug_print_nolock (__VA_ARGS__)
    49       #define LIB_DEBUG_PRINT_BUFFER(...)         __lib_debug_print_buffer (__VA_ARGS__)
     28      #define LIB_DEBUG_PRINTF(...)   printf (__VA_ARGS__)
     29      #define LIB_DEBUG_FPRINTF(...) fprintf (stderr, __VA_ARGS__)
    5030#else
    51       #define LIB_DEBUG_WRITE(...)          ((void)0)
    52       #define LIB_DEBUG_ACQUIRE()           ((void)0)
    53       #define LIB_DEBUG_RELEASE()           ((void)0)
    54       #define LIB_DEBUG_PRINT_SAFE(...)     ((void)0)
    55       #define LIB_DEBUG_PRINT_NOLOCK(...)   ((void)0)
    56       #define LIB_DEBUG_PRINT_BUFFER(...)   ((void)0)
     31      #define LIB_DEBUG_PRINTF(...)  ((void)0)
     32      #define LIB_DEBUG_FPRINTF(...) ((void)0)
    5733#endif
    5834
Note: See TracChangeset for help on using the changeset viewer.