diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-03-28 13:44:18 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-04-03 11:13:25 +0200 |
commit | 3f5f2ce22903c1e1f15fee75938b34987d894916 (patch) | |
tree | b241a719942581e9e15226b380d027ae18f51b4d /cpukit/sapi/src/interrtext.c | |
parent | score: Move __log2table to separate file (diff) | |
download | rtems-3f5f2ce22903c1e1f15fee75938b34987d894916.tar.bz2 |
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.
Diffstat (limited to 'cpukit/sapi/src/interrtext.c')
-rw-r--r-- | cpukit/sapi/src/interrtext.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cpukit/sapi/src/interrtext.c b/cpukit/sapi/src/interrtext.c index a18610cf77..e08414bf9f 100644 --- a/cpukit/sapi/src/interrtext.c +++ b/cpukit/sapi/src/interrtext.c @@ -51,7 +51,8 @@ static const char *const internal_error_text[] = { "INTERNAL_ERROR_GXX_KEY_ADD_FAILED", "INTERNAL_ERROR_GXX_MUTEX_INIT_FAILED", "INTERNAL_ERROR_NO_MEMORY_FOR_HEAP", - "INTERNAL_ERROR_CPU_ISR_INSTALL_VECTOR" + "INTERNAL_ERROR_CPU_ISR_INSTALL_VECTOR", + "INTERNAL_ERROR_RESOURCE_IN_USE" }; const char *rtems_internal_error_text( rtems_fatal_code error ) |