Index: src/libcfa/Makefile.am
===================================================================
--- src/libcfa/Makefile.am	(revision 72dc82a4d117f5fcafe19599a7b13602476df4b4)
+++ src/libcfa/Makefile.am	(revision 78d3dd5829f3bbcb4527885629edab2212e6d4b8)
@@ -49,5 +49,5 @@
 
 libobjs = ${headers:=.o}
-libsrc = libcfa-prelude.c ${headers:=.c}
+libsrc = libcfa-prelude.c interpose.c libhdr/debug.c ${headers:=.c}
 
 # not all platforms support concurrency, add option do disable it
Index: src/libcfa/Makefile.in
===================================================================
--- src/libcfa/Makefile.in	(revision 72dc82a4d117f5fcafe19599a7b13602476df4b4)
+++ src/libcfa/Makefile.in	(revision 78d3dd5829f3bbcb4527885629edab2212e6d4b8)
@@ -43,5 +43,5 @@
 
 # not all platforms support concurrency, add option do disable it
-@BUILD_CONCURRENCY_TRUE@am__append_3 = containers/vector concurrency/coroutine concurrency/thread concurrency/kernel concurrency/monitor
+@BUILD_CONCURRENCY_TRUE@am__append_3 = concurrency/coroutine concurrency/thread concurrency/kernel concurrency/monitor
 
 # not all platforms support concurrency, add option do disable it
@@ -97,13 +97,12 @@
 libcfa_d_a_AR = $(AR) $(ARFLAGS)
 libcfa_d_a_LIBADD =
-am__libcfa_d_a_SOURCES_DIST = libcfa-prelude.c limits.c stdlib.c \
-	math.c iostream.c fstream.c iterator.c rational.c assert.c \
-	containers/vector.c concurrency/coroutine.c \
-	concurrency/thread.c concurrency/kernel.c \
-	concurrency/monitor.c concurrency/CtxSwitch-@MACHINE_TYPE@.S \
-	concurrency/invoke.c
+am__libcfa_d_a_SOURCES_DIST = libcfa-prelude.c interpose.c \
+	libhdr/debug.c limits.c stdlib.c math.c iostream.c fstream.c \
+	iterator.c rational.c assert.c containers/vector.c \
+	concurrency/coroutine.c concurrency/thread.c \
+	concurrency/kernel.c concurrency/monitor.c \
+	concurrency/CtxSwitch-@MACHINE_TYPE@.S concurrency/invoke.c
 am__dirstamp = $(am__leading_dot)dirstamp
-@BUILD_CONCURRENCY_TRUE@am__objects_1 = containers/libcfa_d_a-vector.$(OBJEXT) \
-@BUILD_CONCURRENCY_TRUE@	concurrency/libcfa_d_a-coroutine.$(OBJEXT) \
+@BUILD_CONCURRENCY_TRUE@am__objects_1 = concurrency/libcfa_d_a-coroutine.$(OBJEXT) \
 @BUILD_CONCURRENCY_TRUE@	concurrency/libcfa_d_a-thread.$(OBJEXT) \
 @BUILD_CONCURRENCY_TRUE@	concurrency/libcfa_d_a-kernel.$(OBJEXT) \
@@ -113,8 +112,11 @@
 	libcfa_d_a-iostream.$(OBJEXT) libcfa_d_a-fstream.$(OBJEXT) \
 	libcfa_d_a-iterator.$(OBJEXT) libcfa_d_a-rational.$(OBJEXT) \
-	libcfa_d_a-assert.$(OBJEXT) $(am__objects_1)
+	libcfa_d_a-assert.$(OBJEXT) \
+	containers/libcfa_d_a-vector.$(OBJEXT) $(am__objects_1)
 @BUILD_CONCURRENCY_TRUE@am__objects_3 = concurrency/CtxSwitch-@MACHINE_TYPE@.$(OBJEXT) \
 @BUILD_CONCURRENCY_TRUE@	concurrency/libcfa_d_a-invoke.$(OBJEXT)
-am__objects_4 = libcfa_d_a-libcfa-prelude.$(OBJEXT) $(am__objects_2) \
+am__objects_4 = libcfa_d_a-libcfa-prelude.$(OBJEXT) \
+	libcfa_d_a-interpose.$(OBJEXT) \
+	libhdr/libcfa_d_a-debug.$(OBJEXT) $(am__objects_2) \
 	$(am__objects_3)
 am_libcfa_d_a_OBJECTS = $(am__objects_4)
@@ -122,13 +124,11 @@
 libcfa_a_AR = $(AR) $(ARFLAGS)
 libcfa_a_LIBADD =
-am__libcfa_a_SOURCES_DIST = libcfa-prelude.c limits.c stdlib.c math.c \
-	iostream.c fstream.c iterator.c rational.c assert.c \
-	containers/vector.c concurrency/coroutine.c \
-	concurrency/thread.c concurrency/kernel.c \
-	concurrency/monitor.c concurrency/CtxSwitch-@MACHINE_TYPE@.S \
-	concurrency/invoke.c
-@BUILD_CONCURRENCY_TRUE@am__objects_5 =  \
-@BUILD_CONCURRENCY_TRUE@	containers/libcfa_a-vector.$(OBJEXT) \
-@BUILD_CONCURRENCY_TRUE@	concurrency/libcfa_a-coroutine.$(OBJEXT) \
+am__libcfa_a_SOURCES_DIST = libcfa-prelude.c interpose.c \
+	libhdr/debug.c limits.c stdlib.c math.c iostream.c fstream.c \
+	iterator.c rational.c assert.c containers/vector.c \
+	concurrency/coroutine.c concurrency/thread.c \
+	concurrency/kernel.c concurrency/monitor.c \
+	concurrency/CtxSwitch-@MACHINE_TYPE@.S concurrency/invoke.c
+@BUILD_CONCURRENCY_TRUE@am__objects_5 = concurrency/libcfa_a-coroutine.$(OBJEXT) \
 @BUILD_CONCURRENCY_TRUE@	concurrency/libcfa_a-thread.$(OBJEXT) \
 @BUILD_CONCURRENCY_TRUE@	concurrency/libcfa_a-kernel.$(OBJEXT) \
@@ -138,9 +138,10 @@
 	libcfa_a-fstream.$(OBJEXT) libcfa_a-iterator.$(OBJEXT) \
 	libcfa_a-rational.$(OBJEXT) libcfa_a-assert.$(OBJEXT) \
-	$(am__objects_5)
+	containers/libcfa_a-vector.$(OBJEXT) $(am__objects_5)
 @BUILD_CONCURRENCY_TRUE@am__objects_7 = concurrency/CtxSwitch-@MACHINE_TYPE@.$(OBJEXT) \
 @BUILD_CONCURRENCY_TRUE@	concurrency/libcfa_a-invoke.$(OBJEXT)
-am__objects_8 = libcfa_a-libcfa-prelude.$(OBJEXT) $(am__objects_6) \
-	$(am__objects_7)
+am__objects_8 = libcfa_a-libcfa-prelude.$(OBJEXT) \
+	libcfa_a-interpose.$(OBJEXT) libhdr/libcfa_a-debug.$(OBJEXT) \
+	$(am__objects_6) $(am__objects_7)
 am_libcfa_a_OBJECTS = $(am__objects_8)
 libcfa_a_OBJECTS = $(am_libcfa_a_OBJECTS)
@@ -308,7 +309,8 @@
 AM_CCASFLAGS = @CFA_FLAGS@
 headers = limits stdlib math iostream fstream iterator rational assert \
-	$(am__append_3)
+	containers/vector $(am__append_3)
 libobjs = ${headers:=.o}
-libsrc = libcfa-prelude.c ${headers:=.c} $(am__append_4)
+libsrc = libcfa-prelude.c interpose.c libhdr/debug.c ${headers:=.c} \
+	$(am__append_4)
 libcfa_a_SOURCES = ${libsrc}
 libcfa_a_CFLAGS = -nodebug -O2
@@ -383,4 +385,12 @@
 clean-libLIBRARIES:
 	-test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
+libhdr/$(am__dirstamp):
+	@$(MKDIR_P) libhdr
+	@: > libhdr/$(am__dirstamp)
+libhdr/$(DEPDIR)/$(am__dirstamp):
+	@$(MKDIR_P) libhdr/$(DEPDIR)
+	@: > libhdr/$(DEPDIR)/$(am__dirstamp)
+libhdr/libcfa_d_a-debug.$(OBJEXT): libhdr/$(am__dirstamp) \
+	libhdr/$(DEPDIR)/$(am__dirstamp)
 containers/$(am__dirstamp):
 	@$(MKDIR_P) containers
@@ -415,4 +425,6 @@
 	$(AM_V_AR)$(libcfa_d_a_AR) libcfa-d.a $(libcfa_d_a_OBJECTS) $(libcfa_d_a_LIBADD)
 	$(AM_V_at)$(RANLIB) libcfa-d.a
+libhdr/libcfa_a-debug.$(OBJEXT): libhdr/$(am__dirstamp) \
+	libhdr/$(DEPDIR)/$(am__dirstamp)
 containers/libcfa_a-vector.$(OBJEXT): containers/$(am__dirstamp) \
 	containers/$(DEPDIR)/$(am__dirstamp)
@@ -447,4 +459,6 @@
 	-rm -f containers/libcfa_a-vector.$(OBJEXT)
 	-rm -f containers/libcfa_d_a-vector.$(OBJEXT)
+	-rm -f libhdr/libcfa_a-debug.$(OBJEXT)
+	-rm -f libhdr/libcfa_d_a-debug.$(OBJEXT)
 
 distclean-compile:
@@ -453,4 +467,5 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_a-assert.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_a-fstream.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_a-interpose.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_a-iostream.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_a-iterator.Po@am__quote@
@@ -462,4 +477,5 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_d_a-assert.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_d_a-fstream.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_d_a-interpose.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_d_a-iostream.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_d_a-iterator.Po@am__quote@
@@ -482,4 +498,6 @@
 @AMDEP_TRUE@@am__include@ @am__quote@containers/$(DEPDIR)/libcfa_a-vector.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@containers/$(DEPDIR)/libcfa_d_a-vector.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libhdr/$(DEPDIR)/libcfa_a-debug.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libhdr/$(DEPDIR)/libcfa_d_a-debug.Po@am__quote@
 
 .S.o:
@@ -522,4 +540,32 @@
 @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`
 
+libcfa_d_a-interpose.o: interpose.c
+@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
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-interpose.Tpo $(DEPDIR)/libcfa_d_a-interpose.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='interpose.c' object='libcfa_d_a-interpose.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@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
+
+libcfa_d_a-interpose.obj: interpose.c
+@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`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-interpose.Tpo $(DEPDIR)/libcfa_d_a-interpose.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='interpose.c' object='libcfa_d_a-interpose.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@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`
+
+libhdr/libcfa_d_a-debug.o: libhdr/debug.c
+@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
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libhdr/$(DEPDIR)/libcfa_d_a-debug.Tpo libhdr/$(DEPDIR)/libcfa_d_a-debug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='libhdr/debug.c' object='libhdr/libcfa_d_a-debug.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@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
+
+libhdr/libcfa_d_a-debug.obj: libhdr/debug.c
+@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`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libhdr/$(DEPDIR)/libcfa_d_a-debug.Tpo libhdr/$(DEPDIR)/libcfa_d_a-debug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='libhdr/debug.c' object='libhdr/libcfa_d_a-debug.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@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`
+
 libcfa_d_a-limits.o: limits.c
 @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
@@ -717,4 +763,32 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @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`
+
+libcfa_a-interpose.o: interpose.c
+@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
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-interpose.Tpo $(DEPDIR)/libcfa_a-interpose.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='interpose.c' object='libcfa_a-interpose.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@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
+
+libcfa_a-interpose.obj: interpose.c
+@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`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-interpose.Tpo $(DEPDIR)/libcfa_a-interpose.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='interpose.c' object='libcfa_a-interpose.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@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`
+
+libhdr/libcfa_a-debug.o: libhdr/debug.c
+@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
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libhdr/$(DEPDIR)/libcfa_a-debug.Tpo libhdr/$(DEPDIR)/libcfa_a-debug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='libhdr/debug.c' object='libhdr/libcfa_a-debug.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@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
+
+libhdr/libcfa_a-debug.obj: libhdr/debug.c
+@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`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libhdr/$(DEPDIR)/libcfa_a-debug.Tpo libhdr/$(DEPDIR)/libcfa_a-debug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='libhdr/debug.c' object='libhdr/libcfa_a-debug.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@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`
 
 libcfa_a-limits.o: limits.c
@@ -1048,4 +1122,6 @@
 	-rm -f containers/$(DEPDIR)/$(am__dirstamp)
 	-rm -f containers/$(am__dirstamp)
+	-rm -f libhdr/$(DEPDIR)/$(am__dirstamp)
+	-rm -f libhdr/$(am__dirstamp)
 
 maintainer-clean-generic:
@@ -1057,5 +1133,5 @@
 
 distclean: distclean-am
-	-rm -rf ./$(DEPDIR) concurrency/$(DEPDIR) containers/$(DEPDIR)
+	-rm -rf ./$(DEPDIR) concurrency/$(DEPDIR) containers/$(DEPDIR) libhdr/$(DEPDIR)
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
@@ -1103,5 +1179,5 @@
 
 maintainer-clean: maintainer-clean-am
-	-rm -rf ./$(DEPDIR) concurrency/$(DEPDIR) containers/$(DEPDIR)
+	-rm -rf ./$(DEPDIR) concurrency/$(DEPDIR) containers/$(DEPDIR) libhdr/$(DEPDIR)
 	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic \
Index: src/libcfa/assert.c
===================================================================
--- src/libcfa/assert.c	(revision 72dc82a4d117f5fcafe19599a7b13602476df4b4)
+++ src/libcfa/assert.c	(revision 78d3dd5829f3bbcb4527885629edab2212e6d4b8)
@@ -17,4 +17,6 @@
 #include "stdlib"										// abort
 
+#include "libhdr/libdebug.h"
+
 extern "C" {
 	#include <stdarg.h>								// varargs
@@ -23,9 +25,9 @@
 	extern const char * __progname;						// global name of running executable (argv[0])
 
-	#define CFA_ASSERT_FMT "*CFA assertion error* from program \"%s\" in \"%s\" at line %d in file \"%s\""
+	#define CFA_ASSERT_FMT "Cforall Assertion error from program \"%s\" in \"%s\" at line %d in file \"%s\""
 
 	// called by macro assert in assert.h
 	void __assert_fail( const char *assertion, const char *file, unsigned int line, const char *function ) {
-		fprintf( stderr, CFA_ASSERT_FMT ".\n", __progname, function, line, file );
+		__lib_debug_print_safe( CFA_ASSERT_FMT ".\n", __progname, function, line, file );
 		abort();
 	}
@@ -33,10 +35,14 @@
 	// called by macro assertf
 	void __assert_fail_f( const char *assertion, const char *file, unsigned int line, const char *function, const char *fmt, ... ) {
-		fprintf( stderr, CFA_ASSERT_FMT ": ", __progname, function, line, file );
+		__lib_debug_acquire();
+		__lib_debug_print_nolock( CFA_ASSERT_FMT ": ", __progname, function, line, file );
+
 		va_list args;
 		va_start( args, fmt );
-		vfprintf( stderr, fmt, args );
+		__lib_debug_print_vararg( fmt, args );
 		va_end( args );
-		fprintf( stderr, "\n" );
+
+		__lib_debug_print_nolock( "\n" );
+		__lib_debug_release();
 		abort();
 	}
Index: src/libcfa/concurrency/kernel.c
===================================================================
--- src/libcfa/concurrency/kernel.c	(revision 72dc82a4d117f5fcafe19599a7b13602476df4b4)
+++ src/libcfa/concurrency/kernel.c	(revision 78d3dd5829f3bbcb4527885629edab2212e6d4b8)
@@ -15,7 +15,9 @@
 //
 
+#include "startup.h"
+
 //Start and stop routine for the kernel, declared first to make sure they run first
-void kernel_startup(void)  __attribute__((constructor(101)));
-void kernel_shutdown(void) __attribute__((destructor(101)));
+void kernel_startup(void)  __attribute__(( constructor( STARTUP_PRIORITY_KERNEL ) ));
+void kernel_shutdown(void) __attribute__(( destructor ( STARTUP_PRIORITY_KERNEL ) ));
 
 //Header
@@ -25,6 +27,9 @@
 #include <stddef.h>
 extern "C" {
+#include <stdio.h>
 #include <fenv.h>
 #include <sys/resource.h>
+#include <signal.h>
+#include <unistd.h>
 }
 
@@ -146,5 +151,5 @@
 
 	this->runner = runner;
-	LIB_DEBUG_PRINTF("Kernel : constructing processor context %p\n", runner);
+	LIB_DEBUG_PRINT_SAFE("Kernel : constructing processor context %p\n", runner);
 	runner{ this };
 }
@@ -152,5 +157,5 @@
 void ^?{}(processor * this) {
 	if( ! this->is_terminated ) {
-		LIB_DEBUG_PRINTF("Kernel : core %p signaling termination\n", this);
+		LIB_DEBUG_PRINT_SAFE("Kernel : core %p signaling termination\n", this);
 		this->is_terminated = true;
 		wait( &this->terminated );
@@ -173,5 +178,5 @@
 void main(processorCtx_t * runner) {
 	processor * this = runner->proc;
-	LIB_DEBUG_PRINTF("Kernel : core %p starting\n", this);
+	LIB_DEBUG_PRINT_SAFE("Kernel : core %p starting\n", this);
 
 	thread_desc * readyThread = NULL;
@@ -195,7 +200,7 @@
 	}
 
-	LIB_DEBUG_PRINTF("Kernel : core %p unlocking thread\n", this);
+	LIB_DEBUG_PRINT_SAFE("Kernel : core %p unlocking thread\n", this);
 	signal( &this->terminated );
-	LIB_DEBUG_PRINTF("Kernel : core %p terminated\n", this);
+	LIB_DEBUG_PRINT_SAFE("Kernel : core %p terminated\n", this);
 }
 
@@ -255,5 +260,5 @@
 	processorCtx_t proc_cor_storage = { proc, &info };
 
-	LIB_DEBUG_PRINTF("Coroutine : created stack %p\n", proc_cor_storage.__cor.stack.base);
+	LIB_DEBUG_PRINT_SAFE("Coroutine : created stack %p\n", proc_cor_storage.__cor.stack.base);
 
 	//Set global state
@@ -262,5 +267,5 @@
 
 	//We now have a proper context from which to schedule threads
-	LIB_DEBUG_PRINTF("Kernel : core %p created (%p, %p)\n", proc, proc->runner, &ctx);
+	LIB_DEBUG_PRINT_SAFE("Kernel : core %p created (%p, %p)\n", proc, proc->runner, &ctx);
 
 	// SKULLDUGGERY: Since the coroutine doesn't have its own stack, we can't 
@@ -273,5 +278,5 @@
 
 	// Main routine of the core returned, the core is now fully terminated
-	LIB_DEBUG_PRINTF("Kernel : core %p main ended (%p)\n", proc, proc->runner);	
+	LIB_DEBUG_PRINT_SAFE("Kernel : core %p main ended (%p)\n", proc, proc->runner);	
 
 	return NULL;
@@ -279,5 +284,5 @@
 
 void start(processor * this) {
-	LIB_DEBUG_PRINTF("Kernel : Starting core %p\n", this);
+	LIB_DEBUG_PRINT_SAFE("Kernel : Starting core %p\n", this);
 	
 	// pthread_attr_t attributes;
@@ -288,5 +293,5 @@
 	// pthread_attr_destroy( &attributes );
 
-	LIB_DEBUG_PRINTF("Kernel : core %p started\n", this);	
+	LIB_DEBUG_PRINT_SAFE("Kernel : core %p started\n", this);	
 }
 
@@ -336,5 +341,5 @@
 // Kernel boot procedures
 void kernel_startup(void) {
-	LIB_DEBUG_PRINTF("Kernel : Starting\n");	
+	LIB_DEBUG_PRINT_SAFE("Kernel : Starting\n");	
 
 	// Start by initializing the main thread
@@ -371,9 +376,9 @@
 
 	// THE SYSTEM IS NOW COMPLETELY RUNNING
-	LIB_DEBUG_PRINTF("Kernel : Started\n--------------------------------------------------\n\n");
+	LIB_DEBUG_PRINT_SAFE("Kernel : Started\n--------------------------------------------------\n\n");
 }
 
 void kernel_shutdown(void) {
-	LIB_DEBUG_PRINTF("\n--------------------------------------------------\nKernel : Shutting down\n");
+	LIB_DEBUG_PRINT_SAFE("\n--------------------------------------------------\nKernel : Shutting down\n");
 
 	// SKULLDUGGERY: Notify the systemProcessor it needs to terminates.
@@ -394,5 +399,58 @@
 	^(mainThread){};
 
-	LIB_DEBUG_PRINTF("Kernel : Shutdown complete\n");	
+	LIB_DEBUG_PRINT_SAFE("Kernel : Shutdown complete\n");	
+}
+
+static spinlock kernel_abort_lock;
+static spinlock kernel_debug_lock;
+static bool kernel_abort_called = false;
+
+void * kernel_abort    (void) __attribute__ ((__nothrow__)) {
+	// abort cannot be recursively entered by the same or different processors because all signal handlers return when
+	// the globalAbort flag is true.
+	lock( &kernel_abort_lock );
+
+	// first task to abort ?
+	if ( !kernel_abort_called ) {			// not first task to abort ?
+		kernel_abort_called = true;
+		unlock( &kernel_abort_lock );
+	} 
+	else {
+		unlock( &kernel_abort_lock );
+		
+		sigset_t mask;
+		sigemptyset( &mask );
+		sigaddset( &mask, SIGALRM );			// block SIGALRM signals
+		sigaddset( &mask, SIGUSR1 );			// block SIGUSR1 signals
+		sigsuspend( &mask );				// block the processor to prevent further damage during abort
+		_exit( EXIT_FAILURE );				// if processor unblocks before it is killed, terminate it		
+	}
+
+	return this_thread();
+}
+
+void kernel_abort_msg( void * kernel_data, char * abort_text, int abort_text_size ) {
+	thread_desc * thrd = kernel_data;
+
+	int len = snprintf( abort_text, abort_text_size, "Error occurred while executing task %.256s (%p)", thrd->cor.name, thrd );
+	__lib_debug_write( STDERR_FILENO, abort_text, len );
+
+	if ( thrd != this_coroutine() ) {
+		len = snprintf( abort_text, abort_text_size, " in coroutine %.256s (%p).\n", this_coroutine()->name, this_coroutine() );
+		__lib_debug_write( STDERR_FILENO, abort_text, len );
+	} 
+	else {
+		__lib_debug_write( STDERR_FILENO, ".\n", 2 );
+	}
+}
+
+extern "C" {
+	void __lib_debug_acquire() {
+		lock(&kernel_debug_lock);
+	}
+
+	void __lib_debug_release() {
+		unlock(&kernel_debug_lock);
+	}
 }
 
Index: src/libcfa/concurrency/thread.c
===================================================================
--- src/libcfa/concurrency/thread.c	(revision 72dc82a4d117f5fcafe19599a7b13602476df4b4)
+++ src/libcfa/concurrency/thread.c	(revision 78d3dd5829f3bbcb4527885629edab2212e6d4b8)
@@ -71,5 +71,5 @@
 	this_processor->current_coroutine = thrd_c;
 
-	LIB_DEBUG_PRINTF("Thread start : %p (t %p, c %p)\n", this, thrd_c, thrd_h);
+	LIB_DEBUG_PRINT_SAFE("Thread start : %p (t %p, c %p)\n", this, thrd_c, thrd_h);
 
 	create_stack(&thrd_c->stack, thrd_c->stack.size);
Index: src/libcfa/interpose.c
===================================================================
--- src/libcfa/interpose.c	(revision 78d3dd5829f3bbcb4527885629edab2212e6d4b8)
+++ src/libcfa/interpose.c	(revision 78d3dd5829f3bbcb4527885629edab2212e6d4b8)
@@ -0,0 +1,141 @@
+//                              -*- Mode: CFA -*-
+//
+// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// interpose.c --
+//
+// Author           : Thierry Delisle
+// Created On       : Wed Mar 29 16:10:31 2017
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
+
+#include <stdarg.h>
+#include <stddef.h>
+
+extern "C" {
+#include <stdio.h>
+#include <string.h>
+#include <dlfcn.h>
+#include <unistd.h>
+}
+
+#include "libhdr/libdebug.h"
+#include "startup.h"
+
+void abortf( const char *fmt, ... ) __attribute__ ((__nothrow__, __leaf__, __noreturn__));
+
+void interpose_startup(void)  __attribute__(( constructor( STARTUP_PRIORITY_CORE ) ));
+
+typedef void (*generic_fptr_t)(void);
+generic_fptr_t interpose_symbol( const char* symbol, const char *version ) {
+	const char * error;
+
+	static void * library;
+	if ( ! library ) {
+		#if defined( RTLD_NEXT )
+			library = RTLD_NEXT;
+		#else
+			// missing RTLD_NEXT => must hard-code library name, assuming libstdc++
+			library = dlopen( "libc.so.6", RTLD_LAZY );
+			error = dlerror();
+			if ( error ) {
+				abortf( "interpose_symbol : failed to open libc, %s\n", error );
+			}
+		#endif
+	} // if
+
+	union { generic_fptr_t fptr; void* ptr; } originalFunc;
+	
+	#if defined( _GNU_SOURCE )
+		if ( version ) {
+			originalFunc.ptr = dlvsym( library, symbol, version );
+		} else {
+			originalFunc.ptr = dlsym( library, symbol );
+		}
+	#else
+		originalFunc.ptr = dlsym( library, symbol );
+	#endif // _GNU_SOURCE
+	
+	error = dlerror();
+	if ( error ) abortf( "interpose_symbol : internal error, %s\n", error ); 
+
+	return originalFunc.fptr;
+}
+
+
+__typeof__( exit ) libc_exit __attribute__(( noreturn ));
+__typeof__( abort ) libc_abort __attribute__(( noreturn ));
+
+// #define INIT_REALRTN( x, ver ) libc_##x = (__typeof__(libc_##x))interpose_symbol( #x, ver )
+
+forall(dtype T)
+static inline void assign_ptr( T** symbol_ptr, const char * symbol_name, const char * version) {
+	union { 
+		generic_fptr_t gp;
+		T* tp; 
+	} u;
+
+	u.gp = interpose_symbol( symbol_name, version );
+
+	*symbol_ptr = u.tp;
+}
+
+#define INIT_REALRTN( x, ver ) assign_ptr( (void**)&libc_##x, #x, ver)
+
+void interpose_startup() {
+	const char *version = NULL;
+
+	INIT_REALRTN( abort, version );
+	INIT_REALRTN( exit, version );
+}
+
+extern "C" {
+	void abort (void) __attribute__ ((__nothrow__, __leaf__, __noreturn__)) {
+		abortf( NULL );
+	}
+
+	void exit (int __status) __attribute__ ((__nothrow__, __leaf__, __noreturn__)) {
+		libc_exit(__status);
+	}
+}
+
+void abort( const char *fmt, va_list argp ) __attribute__ ((__nothrow__, __leaf__, __noreturn__)) {
+	abortf( fmt, argp );
+}
+
+void * kernel_abort    (void) __attribute__ ((__nothrow__, __leaf__, __weak__)) { return NULL; }
+void   kernel_abort_msg(void * data, char * buffer, int size) __attribute__ ((__nothrow__, __leaf__, __weak__)) {}
+
+enum { abort_text_size = 1024 };
+static char abort_text[ abort_text_size ];
+
+void abortf( const char fmt[], ... ) __attribute__ ((__nothrow__, __leaf__, __noreturn__)) {
+	void * kernel_data = kernel_abort();
+	
+	int len;
+	
+	if( fmt ) {
+		va_list args;
+		va_start( args, fmt );
+
+		len = vsnprintf( abort_text, abort_text_size, fmt, args );
+
+		va_end( args );
+
+		__lib_debug_write( STDERR_FILENO, abort_text, len );
+		__lib_debug_write( STDERR_FILENO, "\n", 1 );
+	}
+
+	len = snprintf( abort_text, abort_text_size, "Cforall Runtime error (UNIX pid:%ld)\n", (long int)getpid() ); // use UNIX pid (versus getPid)
+    	__lib_debug_write( STDERR_FILENO, abort_text, len );
+
+
+	kernel_abort_msg( kernel_data, abort_text, abort_text_size );
+
+	libc_abort();
+}
Index: src/libcfa/interpose.h
===================================================================
--- src/libcfa/interpose.h	(revision 78d3dd5829f3bbcb4527885629edab2212e6d4b8)
+++ src/libcfa/interpose.h	(revision 78d3dd5829f3bbcb4527885629edab2212e6d4b8)
@@ -0,0 +1,25 @@
+//                              -*- Mode: CFA -*-
+//
+// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// interpose.h --
+//
+// Author           : Thierry Delisle
+// Created On       : Wed Mar 29 15:56:41 2017
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
+
+#ifndef INTERPOSE_H
+#define INTERPOSE_H
+
+void * interpose_symbol( const char* symbol, , const char *version );
+
+extern __typeof__( abort ) libc_abort __attribute__(( noreturn ));
+extern __typeof__( exit ) libc_abort __attribute__(( noreturn ));
+
+#endif //INTERPOSE_H
Index: src/libcfa/libhdr/libdebug.c
===================================================================
--- src/libcfa/libhdr/libdebug.c	(revision 78d3dd5829f3bbcb4527885629edab2212e6d4b8)
+++ src/libcfa/libhdr/libdebug.c	(revision 78d3dd5829f3bbcb4527885629edab2212e6d4b8)
@@ -0,0 +1,88 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// libdebug.c --
+//
+// Author           : Thierry Delisle
+// Created On       : Thu Mar 30 12:30:01 2017
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
+
+extern "C" {
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <stdarg.h>
+#include <unistd.h>
+}
+
+enum { buffer_size = 512 };
+static char buffer[ buffer_size ];
+
+extern "C" {
+
+	void __lib_debug_write( int fd, const char *in_buffer, int len ) {
+		// ensure all data is written
+		for ( int count = 0, retcode; count < len; count += retcode ) { 
+			in_buffer += count;
+
+			for ( ;; ) {
+				retcode = write( fd, in_buffer, len - count );
+
+				// not a timer interrupt ?
+				if ( retcode != -1 || errno != EINTR ) break; 
+			}
+
+			if ( retcode == -1 ) _exit( EXIT_FAILURE );
+		}
+	}
+
+	void __lib_debug_acquire() __attribute__((__weak__)) {}
+	void __lib_debug_release() __attribute__((__weak__)) {}
+
+	void __lib_debug_print_safe  ( const char fmt[], ... ) __attribute__(( format (printf, 1, 2) )) {
+		va_list args;
+
+		va_start( args, fmt );
+		__lib_debug_acquire();
+		
+		int len = vsnprintf( buffer, buffer_size, fmt, args );
+		__lib_debug_write( STDERR_FILENO, buffer, len );
+
+		__lib_debug_release();
+		va_end( args );
+	}
+
+	void __lib_debug_print_nolock( const char fmt[], ... ) __attribute__(( format (printf, 1, 2) )) {
+		va_list args;
+
+		va_start( args, fmt );
+		
+		int len = vsnprintf( buffer, buffer_size, fmt, args );
+		__lib_debug_write( STDERR_FILENO, buffer, len );
+
+		va_end( args );
+	}
+
+	void __lib_debug_print_vararg( const char fmt[], va_list args ) {
+		int len = vsnprintf( buffer, buffer_size, fmt, args );
+		__lib_debug_write( STDERR_FILENO, buffer, len );
+	}
+
+	void __lib_debug_print_buffer( char in_buffer[], int in_buffer_size, const char fmt[], ... ) __attribute__(( format (printf, 3, 4) )) {
+		va_list args;
+
+		va_start( args, fmt );
+		
+		int len = vsnprintf( in_buffer, in_buffer_size, fmt, args );
+		__lib_debug_write( STDERR_FILENO, in_buffer, len );
+
+		va_end( args );
+	}
+}
Index: src/libcfa/libhdr/libdebug.h
===================================================================
--- src/libcfa/libhdr/libdebug.h	(revision 72dc82a4d117f5fcafe19599a7b13602476df4b4)
+++ src/libcfa/libhdr/libdebug.h	(revision 78d3dd5829f3bbcb4527885629edab2212e6d4b8)
@@ -25,10 +25,34 @@
 #endif
 
+#ifdef __cforall
+extern "C" {
+#endif
+      #include <stdarg.h>
+
+      extern void __lib_debug_write( int fd, const char *buffer, int len );
+      extern void __lib_debug_acquire();
+      extern void __lib_debug_release();
+      extern void __lib_debug_print_safe  ( const char fmt[], ... ) __attribute__(( format (printf, 1, 2) ));
+      extern void __lib_debug_print_nolock( const char fmt[], ... ) __attribute__(( format (printf, 1, 2) ));
+      extern void __lib_debug_print_vararg( const char fmt[], va_list arg );
+      extern void __lib_debug_print_buffer( char buffer[], int buffer_size, const char fmt[], ... ) __attribute__(( format (printf, 3, 4) ));
+#ifdef __cforall
+}
+#endif
+
 #ifdef __CFA_DEBUG_PRINT__
-      #define LIB_DEBUG_PRINTF(...)   printf (__VA_ARGS__)
-      #define LIB_DEBUG_FPRINTF(...) fprintf (stderr, __VA_ARGS__)
+      #define LIB_DEBUG_WRITE( fd, buffer, len )  __lib_debug_write( fd, buffer, len )
+      #define LIB_DEBUG_ACQUIRE()                 __lib_debug_acquire()
+      #define LIB_DEBUG_RELEASE()                 __lib_debug_release()
+      #define LIB_DEBUG_PRINT_SAFE(...)           __lib_debug_print_safe   (__VA_ARGS__)
+      #define LIB_DEBUG_PRINT_NOLOCK(...)         __lib_debug_print_nolock (__VA_ARGS__)
+      #define LIB_DEBUG_PRINT_BUFFER(...)         __lib_debug_print_buffer (__VA_ARGS__)
 #else
-      #define LIB_DEBUG_PRINTF(...)  ((void)0)
-      #define LIB_DEBUG_FPRINTF(...) ((void)0)
+      #define LIB_DEBUG_WRITE(...)          ((void)0)
+      #define LIB_DEBUG_ACQUIRE()           ((void)0)
+      #define LIB_DEBUG_RELEASE()           ((void)0)
+      #define LIB_DEBUG_PRINT_SAFE(...)     ((void)0)
+      #define LIB_DEBUG_PRINT_NOLOCK(...)   ((void)0)
+      #define LIB_DEBUG_PRINT_BUFFER(...)   ((void)0)
 #endif
 
Index: src/libcfa/startup.h
===================================================================
--- src/libcfa/startup.h	(revision 78d3dd5829f3bbcb4527885629edab2212e6d4b8)
+++ src/libcfa/startup.h	(revision 78d3dd5829f3bbcb4527885629edab2212e6d4b8)
@@ -0,0 +1,29 @@
+//                              -*- Mode: CFA -*-
+//
+// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// startup.h --
+//
+// Author           : Thierry Delisle
+// Created On       : Wed Mar 29 15:56:41 2017
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
+
+#ifndef STARTUP_H
+#define STARTUP_H
+
+extern "C" {
+	enum {
+		STARTUP_PRIORITY_CORE       = 101,
+		STARTUP_PRIORITY_KERNEL     = 102,
+		STARTUP_PRIORITY_MEMORY     = 103,
+		STARTUP_PRIORITY_IOSTREAM   = 104,
+	};
+}
+
+#endif //STARTUP_H
