Changeset 3f5f2ce in rtems for cpukit/score/src/threadrestart.c

Timestamp:
03/28/14 12:44:18 (10 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, 5, 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.

(No files)

Note: See TracChangeset for help on using the changeset viewer.