Changeset 3f5f2ce in rtems for cpukit/sapi


Ignore:
Timestamp:
Mar 28, 2014, 12:44:18 PM (5 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
f570b071
Parents:
4994927
git-author:
Sebastian Huber <sebastian.huber@…> (03/28/14 12:44:18)
git-committer:
Sebastian Huber <sebastian.huber@…> (04/03/14 09:13:25)
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/sapi/src/interrtext.c

    r4994927 r3f5f2ce  
    5252  "INTERNAL_ERROR_GXX_MUTEX_INIT_FAILED",
    5353  "INTERNAL_ERROR_NO_MEMORY_FOR_HEAP",
    54   "INTERNAL_ERROR_CPU_ISR_INSTALL_VECTOR"
     54  "INTERNAL_ERROR_CPU_ISR_INSTALL_VECTOR",
     55  "INTERNAL_ERROR_RESOURCE_IN_USE"
    5556};
    5657
Note: See TracChangeset for help on using the changeset viewer.