From 3f5f2ce22903c1e1f15fee75938b34987d894916 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 28 Mar 2014 13:44:18 +0100 Subject: score: PR788: Add INTERNAL_ERROR_RESOURCE_IN_USE Issue a fatal error in case a thread is deleted which still owns resources (e.g. a binary semaphore with priority inheritance or ceiling protocol). The resource count must be checked quite late since RTEMS task variable destructors, POSIX key destructors, POSIX cleanup handler, the Newlib thread termination extension or other thread termination extensions may release resources. In this context it would be quite difficult to return an error status to the caller. An alternative would be to place threads with a non-zero resource count not on the zombie chain. Thus we have a resource leak instead of a fatal error. The terminator thread can see this error if we return an RTEMS_RESOURCE_IN_USE status for the rtems_task_delete() for example. --- testsuites/sptests/spfatal28/Makefile.am | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 testsuites/sptests/spfatal28/Makefile.am (limited to 'testsuites/sptests/spfatal28/Makefile.am') diff --git a/testsuites/sptests/spfatal28/Makefile.am b/testsuites/sptests/spfatal28/Makefile.am new file mode 100644 index 0000000000..a20d936f5f --- /dev/null +++ b/testsuites/sptests/spfatal28/Makefile.am @@ -0,0 +1,19 @@ +rtems_tests_PROGRAMS = spfatal28 +spfatal28_SOURCES = ../spfatal_support/init.c ../spfatal_support/system.h testcase.h + +dist_rtems_tests_DATA = spfatal28.scn spfatal28.doc + +include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg +include $(top_srcdir)/../automake/compile.am +include $(top_srcdir)/../automake/leaf.am + +AM_CPPFLAGS += -I$(top_srcdir)/../support/include + +LINK_OBJS = $(spfatal28_OBJECTS) +LINK_LIBS = $(spfatal28_LDLIBS) + +spfatal28$(EXEEXT): $(spfatal28_OBJECTS) $(spfatal28_DEPENDENCIES) + @rm -f spfatal28$(EXEEXT) + $(make-exe) + +include $(top_srcdir)/../automake/local.am -- cgit v1.2.3